- 1
Can my code is correct?
import java.util.*; // Compiler version JDK 11.0.2 class Dcoder { public static void main(String args[]) { int age; System.out.println("enrer your age:"); Scanner obj=new Scanner(System.in); age=obj.nextInt(); if(age>18) { System.out.println("elageble for vote"); } else{ System.out.println("not for elageble for vote"); } } }
9 Answers
+ 1
Sachin Patel
Is there any issue?
+ 2
Solve ho gya sir
rawinput
+ 1
Jayakrishna🇮🇳 #python 2.7.15
letter='''Dear <|name|>,\n your are salected,Date <|date|>'''
name=input("enter yor name")
date=input("enter dalte")
letter=letter.replace("<|name|>",name)
letter=letter.replace("<|date|>",date)
print(letter)
+ 1
A͢J no sir i funded error, raw_input। Thank you
+ 1
Sachin Patel
Kuch issue hai code me ya bas aise hi share kiya hai?
0
bhu study point1625
What is your question?
0
bhu study point1625
You missed to import Scanner class
0
You can check it in java playground here.. Is there any difficulty facing?