class Sum
{
public static void main(String args[])
{
int a, b;
Console con = System.console();
a = Integer.parseInt (con.readLine());
b = Integer.parseInt (con.readLine());
sum = a+b;
System.out.print("Total is :- "+sum); //we can also wrote con.printf("%d",sum);
}
}
{
public static void main(String args[])
{
int a, b;
Console con = System.console();
a = Integer.parseInt (con.readLine());
b = Integer.parseInt (con.readLine());
sum = a+b;
System.out.print("Total is :- "+sum); //we can also wrote con.printf("%d",sum);
}
}
No comments:
Post a Comment