Itc Assignment 2
Itc Assignment 2
6). Write and run a program that simulates a simple calculator. It reads two integers and a
character. If the character is a ‘+’, the sum is printed; if it is a ‘-‘, the difference is printed; if it
is a ‘*’, the product is printed; if it is a ‘/’, the quotient is printed; and if it is a ‘%’, the
remainder is printed
7) The UCP has decided to give some increments to all its employees on the basis of their
experience with the following criteria.
a. 0 years - No increment
b. 1-5 years - 10%
c. 6-10 years – 20%
8) Write a program which keeps taking input from user until user enters a character ‘0’
and checks that how many times character ‘a’ has been entered.
9) Write a program in C++ to find the number and sum of all integer between 100 and
200 which are divisible by 9.
10) Write a C++ program that calculates the sum of a series of numbers entered by the
user. The program should continue to prompt the user to enter numbers until the sentinel
value -99 is entered. Once the sentinel value is detected, the program should terminate the
input process and display the sum of all the entered numbers