Assignment01 24204203 Rose
Assignment01 24204203 Rose
a) hungry: Yes
b) 2AB: No (Variable name can't be started with a number)
c) 312.2: No(Variable name can’t be in number)
d) MOBILE: Yes
e) “Ans”: No(we can not use double quotation)
f) $30: Yes
g) Yes/No: No(we can not use slash sign)
h) student-id: No(we can not use hyphen in variable name)
i) A+3: No(we can not use operator in variable name)
j) ‘X’: No(we can not use single quotation sign)
k) return: No(Can’t use reserved word as variable name. return is a reserved word
in Java)
//task11
2.1
2.2
2.3
2.4
2.5
2.6
//Task12
//Task13
//Task14
}
}
//Task15
a
//Task16
public class task_16
{
public static void main(String[]args)
{
int total_m = 3456789;
int min= 365*24*60;
int y=total_m/min;
System.out.println(y);
int d=(total_m%min)/(24*60);
System.out.println(d);
}
}
//Task17
//Task18
}
}
//Task19
double area=2.598076211*side_value*side_value;
System.out.println(area);
double circumference=6*c;
System.out.println(circumference);
}
}
//Task20