السلام عليكم
أرجوووكم أصدقائي أريد أحد أن يشرحلي معني
buffered reader or scanner
في الجافا متل
import java.io.*;
public class NewMain2 {
/**
* (B) Create a program that asks the user his/her name (no spaces).
* The computer will then ask for his/her age. If the person is older than 18,
* the computer will ask the user to " Step right up (user's name), and vote.
* "If the person is younger than that, the computer will say:" Maybe next time,
* (user's name)"
*/
public static void main(String[] args) throws IOException{
// TODO code application logic here
int nAge;
if (nAge>=18)
{
System.out.println("Step right up");
}
else if (nAge<=18)
{
System.out.println("Maybe next time," );
}
System.out.println("What is your age"+nAge);
System.out.println("Maybe next time"+nAge);
}
}
هدي الكود التي فات يريد
buffered reader or scanner
المهم أريد أحد أن يشرحلي المعنه لئن قريب عندي فيه تطبيق
أني مش فاهم معنه
if and else if
mansour91b كتب:السلام عليكمأرجوووكم أصدقائي أريد أحد أن يشرحلي معني
buffered reader or scanner
في الجافا متل
import java.io.*;
public class NewMain2 {
/**
* ( B) Create a program that asks the user his/her name (no spaces).
* The computer will then ask for his/her age. If the person is older than 18,
* the computer will ask the user to " Step right up (user's name), and vote.
* "If the person is younger than that, the computer will say:" Maybe next time,
* (user's name)"
*/
public static void main(String[] args) throws IOException{
// TODO code application logic here
int nAge;
if (nAge>=18)
{
System.out.println("Step right up");
}
else if (nAge<=18)
{
System.out.println("Maybe next time," );
}
System.out.println("What is your age"+nAge);
System.out.println("Maybe next time"+nAge);
}
}
هدي الكود التي فات يريد
buffered reader or scanner
المهم أريد أحد أن يشرحلي هدي لئن عندي تطبيق فيه
وشكراا