C++ Answers

Questions answered by Experts: 9 913

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Write a program that ask the users to enter three characters. Then the program should display the


following menu



1. Sort in Ascending order


2. Sort in Descending order



The program should perform sorting of these three characters in ascending or descending order as per the user requirement.


Write a program which asks the user to open a bank account either Current or Savings. Your program will


display the following menu at the start:


Press 1 for Current Account

Press 2 for Savings Account




On the selection of account type, the user will open an account by providing an initial amount. In current account the initial amount for opening an account would be 2000 and for savings it would be 5000. After choosing the account type and opening the account with initial amount, your program will display the following menu:


Press a for Deposit the money

Press b for withdrawing the money




In current account the user cannot withdraw more than 10000 rupees. In Savings account the user cannot withdraw more than 25000. When the user withdraws amount make sure that amount should not be more than the balance in account and at the end of withdrawal transaction, there should be minimum of 500 rupees for each account.


Write a program which calculates the monthly Budget of a person. The program will read the


monthly salary of the person. Then give following options:



Press 1 to calculate gas bill charges


Press 2 to calculate electricity bill charges


Press 3 to calculate fueling charges.


Press 4 to calculate house rent charges




His monthly gas bill charges are 10% of his salary, electricity bill charges are 5% of his salary. His monthly


fueling charges are 10% of his salary, and his house rent charges are 15 %. Your program will calculate and


display the corresponding charges based on the selection (1, 2, 3, or 4)


Write a program that reads 10 integers from user and then finds and prints all the Odd numbers that are divisible by 5.


How many time will the loop run?




int count = 11; 

 

while( count <= 31 ) 

  count++; 


What will the value of the result variable be after the code segment below has been run.


int result; 

int number1 = 6, number6 = 49; 

 

result = number1 * number6; 



How many time will the loop run?


for( int i = 19 ; i < 93 ; i++ )  

  


What will the value of the solution variable be after the code segment below has been run.


int solution = 80; 

int number56 = 16, number15 = 7; 

 

solution -= number56 * number15 ; 


What will the value of the solution variable be after the code segment below has been run.


int solution = 8; 

int number1 = 16, number10 = 3; 

 

solution *= number1 - number10 ;  



The formula below decribes how to convert a temperature on the Fahrenheit scale to a temperature on the Kelvin scale.


TempK = (TempF − 32) × 5/9 + 273.15


Using the variables below Write one line of code to implement the formula




// Kelvin temperature


float TempK;


// Fahrenheit temperature


float TempF = 72; 




//One line of code to calculate temperature in Kelvin


=


LATEST TUTORIALS
APPROVED BY CLIENTS