Tuesday, November 9, 2021

Accommodation Room in C++

Machine Problem in C++

Make a program that will input type of accommodation room.  A-for first class, B-for second class. Charge as   follows : first class=800.00 and second class = 650.00.   Your program will be terminated if you input C in   the accommodation room type.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.




Program Listing


/*

Author : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

www.jakerpomperada.blogspot.com and www.jakerpomperada.com

jakerpomperada@gmail.com

Bacolod City, Negros Occidental Philippines.


Machine Problem in C++


Make a program that will input type of accommodation room.

 A-for first class, B-for second class. Charge as 

 follows : first class=800.00 and second class = 650.00. 

 Your program will be terminated if you input C in 

 the accommodation room type.

*/


#include <iostream>

#include <cctype>


int main()

{

char select_room;

    char ch='N';

do {


std::cout << "\n\n";

std::cout << "\tAccommodation Room in C++\n";

std::cout <<"\n";

std::cout <<"\tA-for first class\n";

std::cout <<"\tB-for second class.\n";

std::cout <<"\tC-Quit Program";

std::cout <<"\n\n\t";

std:: cin >> select_room;

ch = toupper(select_room);

 

if (ch=='C') {

break; 

}

 

if (ch=='A') {

std::cout <<"\n";

std::cout <<"\tFirst Class=800.00";

} else if  (ch=='B') {

std::cout <<"\n";

std::cout <<"\tSecond Class = 650.00";

} while (ch!='C');

  std::cout << "\n\n";

std::cout << "\tEnd of Program";

std::cout <<"\n";

}



No comments:

Post a Comment