MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / F_First_Program

Function F_First_Program

Lab_15/Source.cpp:247–288  ·  view source on GitHub ↗

For outputing programs

Source from the content-addressed store, hash-verified

245
246// For outputing programs
247void F_First_Program()
248{
249 system("cls");
250
251 Book book;
252 Tape tape;
253
254 for (int j = 0; j < 1000; j++)
255 {
256 system("cls");
257 cout << " Welcome to Bookshop 'AliBooks' \n 1. Paper version \n 2. Audiobook \n 0. Go back\n Your choice: ";
258 switch (_getch())
259 {
260 // case 1 for the first program
261 case '1':
262 system("cls");
263 book.getdata();
264 cout << "\n\n Your given info:\n";
265 book.showdata();
266 system("pause");
267 break;
268
269 // case 2 for the second program
270 case '2':
271 system("cls");
272 tape.getdata();
273 cout << "\n\nYour given info:\n";
274 tape.showdata();
275 system("pause");
276 break;
277
278 // case 0 to exit
279 case '0':
280 j = 1000;
281 break;
282
283 default:
284 cout << "\t Your choice is not available in Menu. \n\t Please try one more time.\n";
285 break;
286 } // switch
287 } // for loop
288}
289
290void F_Second_Program()
291{

Callers 1

mainFunction · 0.70

Calls 2

getdataMethod · 0.45
showdataMethod · 0.45

Tested by

no test coverage detected