Assignment2B (Due On November 30)
Assignment2B (Due On November 30)
ii) if ( a= 1 )
cout<< "a is equal to 1" ;
else
cout<< "a is not equal to 1" ;
iii) if ( ch == 1 );
cout<< "Lab" ;
else
cout<< "Tutorial" ;
iv) Write four different C statements that each adds 1 to integer variable x.
7. (Credit Limit Calculator) Develop a C++ program that will determine if a
department store customer has exceeded the credit limit on a charge account.
For a customer, the following facts are available:
a. Account number
b. Balance at the beginning of the month
c. Total of all items charged by this customer this month
d. Total of all credits applied to this customer's account this month
e. Allowed credit limit
The program should input each fact, calculate the new balance (= beginning
balance + charges – credits), and determine whether the new balance
exceeds the customer's credit limit. For those customers whose credit limit is
exceeded, the program should display the customer's account number, credit
limit, new balance and the message “Credit limit exceeded.” Here is a
sample input/output dialog:
b. if ( x < 10 ) {
if ( y > 10 )
cout<< "*****" ;
}
else {
cout<< "#####" ;
cout<< "$$$$$" ;
}
10.Write a C++ program to find maximum between two numbers using switch
statement.
11.Write a C++ program to find the day of the week using switch statement.
12.Write a C++ program to check whether an alphabet is a vowel or consonant
using switch statement.
13.Program to Calculate Grades according to your grading system using
switch statement. Total marks are supposed to be 100.
14. (Truth Tables) Complete the following truth tables by filling in each blank
with 0 or 1.
-------------------------------