Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Computer Programming I Tutorial-1

Write a program that checks whether the number entered by a user is exactly divisible by N1 but not by N2. The program first reads all the values. 2. Write a program that takes a character from the user and converts it to uppercase if it is lowercase and vice-versa with library function. 3. Write a program that takes a character from the user and converts it to uppercase if it is lowercase and vice-versa without library function. 4. Write a program to determine the volume of a cuboid if their dimensions are positive. 5. Write a program to multiply two floating point numbers and printing the product in exponential notation. 6. Write a program that reads 3 numbers and finds the smallest among them. 7. Write a program that asks the user to type in two integer values at the terminal and tests them to determine if the 1st is perfectly divisible by 2nd, and display appropriate message at the terminal. 2 8. Write a program to find the roots of a quadratic equation ax +bx+c=0. The program must first show whether the roots are real and unequal or real and equal or complex conjugates. In case of complex roots, the roots must be displayed in the form x+yi, x-yi. 9. Write a program to find profit / loss if cost price and selling price is given. 10. Write a program to determine whether a character entered by a user is an uppercase, lowercase, a digit, or a special symbol. m 11. Write a program to find n where n and m are given by user. 12.Write a program illustrating switch statement. 13. Write a program to calculate the frequency of an L-C-R circuit when values are entered by user.
1.

* To be submitted within a week


Compiled By: Samir Thapa For Himalaya College of Engineering write@samirthapa.com.np

You might also like