What's new

Closed C++

Status
Not open for further replies.

PHC-Bill Gates

Forum Guru
Elite
Joined
Sep 23, 2016
Posts
4,269
Reaction
1,266
Points
1,270
Age
22
pinapagawa po kami ng prof namin ng final project kung saan magagamit ang c++. suggest naman po kayo yung madali pero kakaiba

salamat po
 
#include <iostream> #include <string> #include <sstream> using namespace std; string user; string user1="ryan"; string Ltransaction; string Maintransaction ; int AmountToletter; int main() { string choice, transaction; int pin, deposit, amount , balance, wí†hdráw; do { Ltransaction = "" ; cout<<"Welcome to Yalung ATM <24 hrs>"; cout<<"\nEnter Username: "; cin>>user; cout<<"Enter Pincode: "; cin>>pin; if (pin==22 && user==user1) { balance=50000; do { do { cout<<"\nTRANSACTIONS \nD or d - Deposit \nW or w - wí†hdráw \nB or b - Balance\n"; cout<<"\nEnter Your Transaction: "; cin>>transaction; if (transaction=="D" || transaction=="d") { do { cout<<"Amounts \n1 - 100 \n2 - 200 \n3 - 500 \n4 - 1,000 \n5 - 10,000 \n6 - Others"; cout<<"\nChoose Amount: "; cin>>choice; if (choice=="1") { amount=100; } else if (choice=="2") { amount=200; } else if (choice=="3") { amount=500; } else if (choice=="4") { amount=1000; } else if (choice=="5") { amount=10000; } else if (choice=="6") { cout<<"Enter Amount: "; cin>>amount; } else { cout<<"Invalid\n"; amount=0; } AmountToletter = amount ; Ltransaction = "You Deposit:"; do { cout<<"Enter Pincode: "; cin>>pin; if (pin==22) { deposit=balance+amount; balance=deposit; cout<<"Deposit Amount: "<<amount<<"\nYour Current Balance is: "<<balance; } else if (pin==22 && amount==0) { cout<<"Deposit Amount: "<<amount<<"\nYour Current Balance is: "<<balance; } else { cout<<"\nInvalid Pin!\n"; } } while (pin!=22); cout<<"\nDeposit again? Yes or No?: "; cin>>choice; } while (choice=="Yes"); } else if (transaction=="W" || transaction=="w") { do { cout<<"Amounts\n1 - 100\n2 - 200\n3 - 500\n4 - 1,000\n5 - 10,000\n6 - Others"; cout<<"\nChoose Amount: "; cin>>choice; if (choice=="1") { amount=100; } else if (choice=="2") { amount=200; } else if (choice=="3") { amount=500; } else if (choice=="4") { amount=1000; } else if (choice=="5") { amount=10000; } else if (choice=="6") { cout<<"Enter Amount: "; cin>>amount; if (amount>balance) { cout<<"MACHINE NOW TERMINATING.....\n"; } } else { cout<<"Invalid\n"; amount=0; } do { cout<<"Enter Pincode: "; cin>>pin; if (pin==22) { if (amount<=balance) { wí†hdráw=balance-amount; balance=wí†hdráw; cout<<"wí†hdráw Amount: "<<amount<<"\nYour Current Balance is: "<<balance; } else if (amount>balance) { cout<<"wí†hdráw Amount: "<<amount<<"\nYour Current Balance is: "<<balance; } else if (amount==0) { cout<<"wí†hdráw Amount: "<<amount<<"\nYour Current Balance is: "<<balance; } } else { cout<<"\nInvalid Pin!!!!\n"; } } while (pin!=22); cout<<"\nwí†hdráw again? Yes or No?: "; cin>>choice; } while (choice=="Yes"); AmountToletter = amount ; Ltransaction = "You wí†hdráw:" ; } else if (transaction=="B" || transaction=="b") { cout<<"Your Balance is: "<<balance<<'\n'; AmountToletter = balance ; Ltransaction = "You balance:"; } else { cout<<"INVALID TRANSACTION!!\n"; } stringstream number ; number << AmountToletter << endl ; string newString = number.str(); Maintransaction = Maintransaction + Ltransaction + newString ; } while (((transaction!="D" && transaction!="d") && (transaction!="W" && transaction!="w")) && (transaction!="B" && transaction!="b")); cout<<"\nAnother Transaction? Yes or No: "; cin>>choice; if (choice == "No" || choice == "no"){ cout << "****** Last transaction*******\n"; cout << Maintransaction ; cout << "\n******************************" ; cout<<"\nTHANK YOU FOR BANKING WITH US!!"; } } while (choice=="Yes" || choice == "yes"); } } while ((user!=user1 || pin!=22) ); return 0; }
 
#include <iostream> #include <string> #include <sstream> using namespace std; string user; string user1="ryan"; string Ltransaction; string Maintransaction ; int AmountToletter; int main() { string choice, transaction; int pin, deposit, amount , balance, wí†hdráw; do { Ltransaction = "" ; cout<<"Welcome to Yalung ATM <24 hrs>"; cout<<"\nEnter Username: "; cin>>user; cout<<"Enter Pincode: "; cin>>pin; if (pin==22 && user==user1) { balance=50000; do { do { cout<<"\nTRANSACTIONS \nD or d - Deposit \nW or w - wí†hdráw \nB or b - Balance\n"; cout<<"\nEnter Your Transaction: "; cin>>transaction; if (transaction=="D" || transaction=="d") { do { cout<<"Amounts \n1 - 100 \n2 - 200 \n3 - 500 \n4 - 1,000 \n5 - 10,000 \n6 - Others"; cout<<"\nChoose Amount: "; cin>>choice; if (choice=="1") { amount=100; } else if (choice=="2") { amount=200; } else if (choice=="3") { amount=500; } else if (choice=="4") { amount=1000; } else if (choice=="5") { amount=10000; } else if (choice=="6") { cout<<"Enter Amount: "; cin>>amount; } else { cout<<"Invalid\n"; amount=0; } AmountToletter = amount ; Ltransaction = "You Deposit:"; do { cout<<"Enter Pincode: "; cin>>pin; if (pin==22) { deposit=balance+amount; balance=deposit; cout<<"Deposit Amount: "<<amount<<"\nYour Current Balance is: "<<balance; } else if (pin==22 && amount==0) { cout<<"Deposit Amount: "<<amount<<"\nYour Current Balance is: "<<balance; } else { cout<<"\nInvalid Pin!\n"; } } while (pin!=22); cout<<"\nDeposit again? Yes or No?: "; cin>>choice; } while (choice=="Yes"); } else if (transaction=="W" || transaction=="w") { do { cout<<"Amounts\n1 - 100\n2 - 200\n3 - 500\n4 - 1,000\n5 - 10,000\n6 - Others"; cout<<"\nChoose Amount: "; cin>>choice; if (choice=="1") { amount=100; } else if (choice=="2") { amount=200; } else if (choice=="3") { amount=500; } else if (choice=="4") { amount=1000; } else if (choice=="5") { amount=10000; } else if (choice=="6") { cout<<"Enter Amount: "; cin>>amount; if (amount>balance) { cout<<"MACHINE NOW TERMINATING.....\n"; } } else { cout<<"Invalid\n"; amount=0; } do { cout<<"Enter Pincode: "; cin>>pin; if (pin==22) { if (amount<=balance) { wí†hdráw=balance-amount; balance=wí†hdráw; cout<<"wí†hdráw Amount: "<<amount<<"\nYour Current Balance is: "<<balance; } else if (amount>balance) { cout<<"wí†hdráw Amount: "<<amount<<"\nYour Current Balance is: "<<balance; } else if (amount==0) { cout<<"wí†hdráw Amount: "<<amount<<"\nYour Current Balance is: "<<balance; } } else { cout<<"\nInvalid Pin!!!!\n"; } } while (pin!=22); cout<<"\nwí†hdráw again? Yes or No?: "; cin>>choice; } while (choice=="Yes"); AmountToletter = amount ; Ltransaction = "You wí†hdráw:" ; } else if (transaction=="B" || transaction=="b") { cout<<"Your Balance is: "<<balance<<'\n'; AmountToletter = balance ; Ltransaction = "You balance:"; } else { cout<<"INVALID TRANSACTION!!\n"; } stringstream number ; number << AmountToletter << endl ; string newString = number.str(); Maintransaction = Maintransaction + Ltransaction + newString ; } while (((transaction!="D" && transaction!="d") && (transaction!="W" && transaction!="w")) && (transaction!="B" && transaction!="b")); cout<<"\nAnother Transaction? Yes or No: "; cin>>choice; if (choice == "No" || choice == "no"){ cout << "****** Last transaction*******\n"; cout << Maintransaction ; cout << "\n******************************" ; cout<<"\nTHANK YOU FOR BANKING WITH US!!"; } } while (choice=="Yes" || choice == "yes"); } } while ((user!=user1 || pin!=22) ); return 0; }
kuya meron ka pa pang ibang program dyan nag aaral pa kasi ako sa java at trtry ko palang e convert to sa java salamat pala.
 
kuya meron ka pa pang ibang program dyan nag aaral pa kasi ako sa java at trtry ko palang e convert to sa java salamat pala.
Wala na po sa ngayon , hanap ka nalang ng problem tapos solve mo nakang at mag patulong ka dito ts kung di mo makuha
 
walanjo kayo. source code na mismo hinihingi nyo e. Bakit ayaw nyo gawin ng sarili nyo? Di kayo magiging magaling na developer/programmer nyan pag ganyan
 
Status
Not open for further replies.

Similar threads

Back
Top