Calculating result of students using conditional operator


Question 1) Write a program to input marks of a student and print the result (pass/fail) using conditional operator.

Question 2) Write a program to input inches from the user and convert it into yards, feet and inches.

Question 3) Write a program to determine the area of a triangle.

Question 4) Write a program to determine whether a given number is even or odd using conditional operator.

Question 5) Write a program to determine the greatest of three numbers using conditional operator.

Question 6) Write a program to input choice (1 or 2). If choice is 1 print the area of a circle otherwise print the circumference of circle. Input the radius from user.

Question 7) Write a program to input a number. If the number is even, print its square otherwise print itscube.

Question 8) Write a program to input employee code, name and basic salary of an employee and compute the following values:

HRA                        40 % of basic salary
DA                          10 % of basic salary
CCA                         5 % of basic salary
GS                             Basic + HRA + DA + CCA
PF                             10 % of GS
IT                               10 % of GS
NS                              GS – (PF + IT)

Display all the values.

Question 9) Write a program to input the temperature in Fahrenheit and convert it into Celsius and viceversa.

Question 10) Write a program to swap the values of two integer variables

(a)Using extra variable

(b) Without using extra variable

Question 11) Write a program to print the system date.

Question 12) Write a program to find the age of a person by the given date of birth.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Calculating result of students using conditional operator
Reference No:- TGS04875

Expected delivery within 24 Hours