Professional Documents
Culture Documents
Santos, John Cedrick I. Final Project in Programming
Santos, John Cedrick I. Final Project in Programming
#include <stdio.h>
#include <istream>
#include <fstream>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <conio.h>
int main()
float deposit, cashout, total, interest, us, jp, cy, eu, am;
int ced, j, p;
char q;
cout<<"----Registration Screen----"<<endl;
cout<<"Enter Username:"<<endl;
cout<<"Enter Password:"<<endl;
cin>>pass1;
ifstream input("database.txt");
system("CLS");
cin>>q;
getch();
system("CLS");
cout<<"--------JOESTAR_BANK.com--------"<<endl;
cout<<" "<<endl;
cout<<"LOG IN:"<<endl;
cout<<"HELLO!!!!"<<name<<" !!!"<<endl;
cout<<"Enter password:"<<endl;
cin>>pass3;
if (pass1 == pass3) {
HEY:
cout<<"-------WELCOME! "<<name<<"!!!-------"<<endl;
cout<<">>>>>>Main Menu<<<<<<"<<endl;
cin>>ced;
switch (ced) {
case 1:
cin>>deposit;
cin>>q;
getch();
system("CLS");
cout<<"Would you like to exchange your Peso rate into Foreign Currency?"<<endl;
cout<<"Choose [4] for yes."<<endl;
cin>>j;
ifstream input("database.txt");
system("CLS");
if (j == 5){
goto HEY;
if (j == 4) {
cin>>p;
if (p == 6) {
cin>>am;
us = am * 0.018;
getch();
system("CLS");
goto HEY;
}if (p == 7) {
cin>>am;
jp = am * 0.018;
getch();
system("CLS");
goto HEY;
if (p == 8) {
cin>>am;
cy = am * 0.13;
getch();
system("CLS");
goto HEY;
if (p == 9) {
cin>>am;
eu = am * 0.017;
getch();
system("CLS");
goto HEY;
if (j ==5) {
goto HEY;
case 2:
cin>>cashout;
cin>>q;
system("CLS");
goto HEY;
break;
}
case 3:
goto END;
else {
END:
return 0;
Final note:
The biggest mistake that I did RIGHT after making the video for hours is that I messed up really bad with
the equations for the total - exchange amount. The name variable doesn't accept space between it so I
added a getline for this version. Another mistake that I realized after testing it after finishing the video
edit is the function where the exchanged value doesnt stack which I all fixed in this more, finalized
version. Im sorry ma'am and I hope you consider that mistake because I did my best making this code
despite being mediocre at best. The hardware final project and the quizzes are basically my fist time
editing a video in my entire life so excuse the cringe that I made. Merry Christmas and thank you very
much.