Computer Science, asked by vb054637, 6 months ago

Consider the following input:
one, two three, four, five
What values will the following code assign to the variables input1 and
String input1 = keyboard.next();
String input2 = keyboard.next();​

Answers

Answered by Anonymous
2

Answer:

1.

Write a program to take two integer inputs from user and print sum and product of them.

2.

Take two integer inputs from user. First calculate the sum of two then product of two. Finally, print the sum and product of both obtained results.

3.

Ask user to give two double input for length and breadth of a rectangle and print area type casted to int.

4.

Take name, roll number and field of interest from user and print in the format below :

Hey, my name is xyz and my roll number is xyz. My field of interest are xyz.

5.

Take side of a square from user and print area and perimeter of it.

6.

Write a program to find square of a number.

E.g.-

INPUT : 2        OUTPUT : 4

INPUT : 5        OUTPUT : 25

7.

Take two different string input and print them in same line. E.g.-

INPUT : Codes

Dope

OUTPUT : CodesDope

8.

Take 3 inputs from user and check :

all are equal

any of two are equal

( use && || )

9.

Write a program to enter the values of two variables 'a' and 'b' from keyboard and then check if both the conditions 'a < 50' and 'a < b' are true.

10.

If the marks of Robert in three subjects are entered through keyboard (each out of 100 ), write a program to calculate his total marks and percentage marks.

Explanation:

Similar questions