Final Activity - Baloloy
Final Activity - Baloloy
C++ Programming
Final Activity
A. PREPARATION:
B. COPY OF PROGRAM
C. PROCESS
COMPLETE CODE:
#include <iostream>
int
main ()
string response1;
cout <<"Jm sari-sari store" << endl<< endl<< "Hello, how may I help you? Do you
wanna buy something?" << endl << "You: ";
cin >> response1;
int restart = 0;
while(restart == 0) {
string response2;
int response3;
cout <<
response2 = "candy";
response2 = "chocolate";
response2 = "Lollipop";
response2 = "marshmallow";
}
cout << "How many?"<< endl << "Available stocks:"<< endl<< "1. Candy -
20 pcs" << endl <<
"2. Chocolate - 20 pcs" << endl << "3. Lollipop - 20 pcs" << endl <<
"4.Marshmallow - 20 pcs" <<endl << "You: ";
string response4;
cout << "Sorry, we have insufficient amount of " << response2 << ". Do you still
want to proceed?" << endl
if (response4 == "yes") {
return 0;
cout << "Thank you sir/ma'am for buying " << response3 <<" pcs of
"<<response2<<" to us. Come again please!";
return 0;
restart = 1;
cout << "Thank you for visiting, have a good day ahead!";
restart = 1;
else{
cout << "I can't understand you, do you wanna buy something?" << endl
<< "You: ";
restart = 0;
return 0;
It was fun and exciting! It was fun to see that our knowledge weren’t all for naught and
exciting when our code finally succeed
E. CONCLUSION
In this final activity, we finally assimilated and combined all of our understanding and
knowledge from our past lessons. It was very satisfying seeing your code being a
compilation of different operations that we have discussed in our previous sessions.