Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Targil {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- boolean gen;
- final int nowYear=2016;
- Scanner s= new Scanner(System.in);
- System.out.println("Enter you'r barthDay year (yyyy):");
- int barthY= nowYear- s.nextInt();
- System.out.println("Enter you'r Id number:");
- int id= s.nextInt();
- System.out.println("Enter you'r hight (in metres):");
- double hight=s.nextDouble();
- System.out.println("Enter M\\F (one char Capitle):");
- char gender=s.next().charAt(0);
- System.out.println("\nYou'r age is: "+barthY+"\nYou'r Id number is: "
- +id+"\nYou'r hight is: "+hight+"\nYou'r gender is: "+gender);
- if(gender=='M')
- {
- gen=true;
- }else{
- gen=false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement