FYBCS C Exercise_6

Set A . Write C programs for the following problems 

 1. Write a program, which accepts a character from the user and checks if it is an alphabet, digit or punctuation symbol. If it is an alphabet, check if it is uppercase or lowercase and then change the case.

 2. Write a menu driven program to perform the following operations till the user selects Exit. Accept appropriate data for each option. Use standard library functions from math.h 
i. Sine       ii. Cosine       iii. log       iv. e^x       v. Square Root       vi. Exit 

 3. Accept two complex numbers from the user (real part, imaginary part). Write a menu driven program to perform the following operations till the user selects Exit.
 i. ADD
ii. SUBTRACT
iii. MULTIPLY 
iv. EXIT 

Set B . Write C programs for the following problems 

1. Accept two fraction numbers from the user ( numerator, denominator ). Write a menu driven program to perform the following operations till the user selects Exit.  
i. ADD 
ii. SUBTRACT
iii. MULTIPLY 
iv. EXIT

 2. Accept x and y coordinates of two points and write a menu driven program to perform the following operations till the user selects Exit. 
i. Distance between points. 
ii. Slope of line between the points.
iii. Check whether they lie in the same quadrant. 
iv. EXIT 
(Hint: Use formula m = (y2-y1)/(x2-x1) to calculate slope of line.) 

Post a Comment

0 Comments