This Program accepts year from users and check whether the given year is leap year or not using ladder if else.
The factorial of a positive number n is calculated by: The factorial of n (n!) = 1 * 2 * 3 * 4....n In this program we will find the factorial of a number where the number should be entered by the user. Factorial is sequence of a number whose multiply all previous number.
This Program stores two integers one by one into the int datatype. After that find the least common factor of these two numbers as shown as output.
This Program stores two integers one by one into the int datatype. After that find the Greatest common factor of these two numbers as shown as output.
This Program stores two integers one by one into the int datatype. After the successful swapping of numbers it will exchange the value of them at once or you can say that it assign a's value to b and b's value to a.
This Program stores two integers one by one into the int datatype. After the successful swapping of numbers it will exchange the value of them at once.
This Program runs a loop from 2 to 100 and checks for each current number within range that it is prime or not. After the successful execution of the program it displays the list of all prime numbers from 2 to 100. As we know that 1 is not a prime number so we don't need to check it.
This Program stores an integer into the variable with int datatype. After it is used for the loop it checks all divisors between 2 and the number itself. Then, Compare it is divisible or not by any number rather than 1 and itself. At last If the user input 1 then it shows the 1 is a prime number. Next, If the user inter 23 then it displays 23 is a prime number and Display to enter another number.
This Program stores two integers into the int datatype by using to variables. After that store the sum of these two variables into another variable and display it on the screen.After the successful compilation of the program, Program sums up the two entered numbers at once.
This Program reversed any number such as Integer, float, or decimal in their equivalent. After the successful compilation of the program, a message is displayed on the screen as Please! Enter a string that you want to reverse: Suppose, User, entered 11001 then again a message is displayed as The Equivalent Reversed Number is 10011. Read more...
Never Miss an Articles from us.
Contribute the Community.