some programming

2nd Semester

1.Write a program that prints Hello World! on screen.

2. Sum of two integers

3. Celsius to Farenheit conversion

4. Simple interest

5. Print ASCII value

6. Swapping of two numbers

7. Area and circumference of Circle

8.Area and circumference of Rectangle

9. Area of Triangle

10. Compound Interest

10 .Write a program that prompts the user to input a number and display if the number is even or odd.

11.Write a program that prompts the user to input a year and determine whether the year is a leap year or not.

12. Write a program that prompts the user to input a character and determine the character is vowel or consonant.

13.Write a program to print numbers from 1 to 10.

14 .Write a program that prompts the user to input a number and prints its factorial.

15.Write a program that prompts the user to input a number and reverse its digits. For example, the reverse of 12345 is 54321; reverse of 5600 is 65.

16 .A palindromic number is a number that remains the same when its digits are reversed. For example, 16461. Write a program that prompts the user to input a number and determine whether the number is palindrome or not.

 

17.Write a program that prompts the user to input a positive integer. It should then output a message indicating whether the number is a prime number.

A prime number is a number that is evenly divisible only by itself and 1. For example, the number 5 is prime because it can be evenly divided only by 1 and 5. The number 6, however, is not prime because it can be divided evenly by I, 2, 3, and 6

18.Write a program to enter the numbers till the user wants and at the end the program should display the largest and smallest numbers entered.

 

19.Write a program to find all Armstrong number in the range of 0 and 999

An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is an Armstrong number since 33 + 73 + 13 = 371.

 

Leave a Reply

Your email address will not be published.