225
Class problems 02/18/2016 CS225
1. Write a program to take input of an integer and find out if it’s even or odd.
2. Write a program to take input of temperature in Celsius and convert it into Fahrenheit.
3. Write a program to take input of a 5 digit number and find if it’s a palindrome or not.
4. Write a program to find:
a. To find the value of e for:
e = 1 + 1/1! + 1/2! + 1/3! + 1/4! + … upto n terms
Take the input of “n” from the user
b. To find the value of e for:
ex = 1 + x/1! + x2/2! + x3/3! + x4/4! + … upto n terms
Take the input of “n” & “x” from the user
5. Write one program using switch/case/default that will offer user choice for all the above ^ programs (1 – 4.b) and will run in an infinite loop. One option (case) will also be to exit.
Output:
1. Even/Odd
2. Temperature Conversion
3. Palindrome test
4. Find the value of e
5. Find the value of e to the power x
6. Exit
Enter your option (1-6) and press enter:
10 years ago 5
- cefulu pg. report
- three page
- LAW 421 Week 3 Complete Contemporary Business Law A+ Graded
- Develop a Case Study for a Classroom Management course
- PSY 320 Week 3 DQ's (Human Motivation) A+
- (akademik ONLY) Evidence for Complementary and Alternative Interventions Brochure
- College Algebra Help
- acct prjt
- revision 2
- Last