Friday 19 October 2018

Practice Programming Questions in Java (Part 1)




Hey,

As I promised, I am going to give you some simple question based on

  • Simple Input/Output
  • Based on some Condition
  • Based on loops


And in case if you want answers to these question...then you have to comment your email id at the end of this post and I will mail you.


# Program...


1 - Write a program to get two numbers from the user and print its sum on the console.

2 - Write a program to get three numbers from the user and print the Largest of Three Numbers.

3 - Write a program to get 1 number from the user and print all the even number from 2 to userNumber.
[Using all loops]

4 - Write a program to get 1 number from the user and print all the odd number from 2 to userNumber.
[Using all loops]

5 - Write a program to print your name 100 times without using loop.
[Hint - You can do that using recursion. ( it is not the only way to do that. )] 





No comments:

Post a Comment