الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

ممكن ارااائكم

بدأه ريمونتي في 1 أبريل 2011 · 7 رد · 403 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

ماني عارفه دا الكود ينفع ولا لا وايش التعديلات اللي ممكن اغيرها

#include<iostream.h>

int main()

{

double balance = 10000;

double withdraw, deposit;

int option;

int password;

cout <<"enter password:\n";

cin>>password;

if (password==123456)

for (int i=0;i<3;i++)

do{cout<<"\n";

cout<<" ***MOGOL***\n";

cout<<"*** Automated Teller Machine***"<<endl;

cout<<"Choose a Transaction:\n";

cout<<"\n";

cout<<"[1] Inquire Balance \n"

<<"[2] Withdraw \n"

<<"[3] Deposit \n"

<<"[4] Quit \n"

<<"\n"

<<"Enter Option:";

cin>>option;

switch(option)

{

case 1:

cout<<"\n[[[bALANCE INQUIRY]]]\n";

cout.setf(ios::fixed);

cout.setf(ios::showpoint);

cout.precision(2);

cout<<"\n Your current balance is $"<<balance<<endl;

break;

case 2:

cout<<"\n[[[WITHDRAW]]]\n";

cout<<"Enter amount: $";

cin>>withdraw;

balance = balance - withdraw;

cout.setf(ios::fixed);

cout.setf(ios::showpoint);

cout.precision(2);

cout<<"You withdrew $"<<withdraw<<endl;

cout<<"Your remaining balance is $"<<balance<<endl;

continue;

case 3:

cout<<"\n[[[DEPOSIT]]]\n";

cout<<"Enter amount: $";

cin>>deposit;

balance = balance + deposit;

cout.setf(ios::fixed);

cout.setf(ios::showpoint);

cout.precision(2);

cout<<"You deposited $"<<deposit<<endl;

cout<<"Your new balance is $"<<balance<<endl;

continue;

case 4:

cout<<"\n***[[[EXIT MODE]]]***\n";

break;

default:

cout<<"\n That is an invalid option \n";

}while(//statement...blah blah, somewhere here,he put some condition, yah it definitely works!!!

break;

}

else

cout<<"Pls try again!!!\n";}

return 0;

}//

1 −2
#2

السلام عليكم

وضع الكود بالصندوق الخاص لتسهل مراجعته او الإستفادة منه نظرياً لاحقاً

#include<iostream.h>


int main()

{
	double balance = 10000;
	double withdraw, deposit;
	int option;
	int password;

cout <<"enter password:\n";
	cin>>password;
if (password==123456)
for (int i=0;i<3;i++)

do{cout<<"\n";
cout<<"           ***MOGOL***\n";
	cout<<"*** Automated Teller Machine***"<<endl;
	cout<<"Choose a Transaction:\n";
	cout<<"\n";
	cout<<"[1] Inquire Balance \n"
		<<"[2] Withdraw \n"
		<<"[3] Deposit \n"
		<<"[4] Quit \n"
		<<"\n"
		<<"Enter Option:";
	cin>>option;

	switch(option)
	{
	case 1:
		cout<<"\n[[[BALANCE INQUIRY]]]\n";
		cout.setf(ios::fixed);
		cout.setf(ios::showpoint);
		cout.precision(2);
		cout<<"\n Your current balance is $"<<balance<<endl;
		break;
	case 2:
		cout<<"\n[[[WITHDRAW]]]\n";
		cout<<"Enter amount: $";
		cin>>withdraw;

		balance = balance - withdraw;

		cout.setf(ios::fixed);
		cout.setf(ios::showpoint);
		cout.precision(2);

		cout<<"You withdrew $"<<withdraw<<endl;
		cout<<"Your remaining balance is $"<<balance<<endl;
	continue;
	case 3:
		cout<<"\n[[[DEPOSIT]]]\n";
		cout<<"Enter amount: $";
		cin>>deposit;

		balance = balance + deposit;

		cout.setf(ios::fixed);
		cout.setf(ios::showpoint);
		cout.precision(2);

		cout<<"You deposited $"<<deposit<<endl;
		cout<<"Your new balance is $"<<balance<<endl;
		continue;
		case 4:
		cout<<"\n***[[[EXIT MODE]]]***\n";

	break;


	default:
		cout<<"\n That is an invalid option \n";
	}while(//statement...blah blah, somewhere here,he put some condition, yah it definitely works!!!






		break;
	}
	else


		cout<<"Pls try again!!!\n";}

return 0;
}//

إن شاء الله سأقوم بتجربته ومراجعته بوقت تاني اليوم

موفقة يارب

[وسط]

♥ Countess ♥

57899411.gif

♥

[/وسط]

#3
ريمونتي كتب:

ماني عارفه دا الكود ينفع ولا لا وايش التعديلات اللي ممكن اغيرها

السلام عليكم

الكود بالكامل مو نافع ومكتوب بطريقة غريبة وغير جادة...

بخصوص التعديلات:

كل الكود

آسفة لتأخير

أطيب المُنى

[وسط]

♥ Countess ♥

57899411.gif

♥

[/وسط]

#4

اخر التعب والكود ابدا مو نافع

يسلمو خيوو

:wacko: :wacko:

الله يعيييييييييييييين :unsure: :unsure:

#5
ريمونتي كتب:

اخر التعب والكود ابدا مو نافع

يسلمو خيوو

:wacko: :wacko:

الله يعيييييييييييييين :unsure: :unsure:

وكنت متحفظة كمان

طبعاً ونعم بالله المعين

[وسط]

♥ Countess ♥

57899411.gif

♥

[/وسط]

#6
ريمونتي كتب:

اخر التعب والكود ابدا مو نافع

يسلمو خيوو

:wacko: :wacko:

الله يعيييييييييييييين :unsure: :unsure:

الكود يحتوي على بعض الاخطاء معضمها في الاقواس . هذا الكود بعد حل اخطاء الترجمه.

#include<iostream>
using namespace std;

int main()

{
	double balance = 10000;
	double withdraw, deposit;
	int option;
	int password;

	cout <<"enter password:\n";
	cin>>password;
	while(password!=123456)
	{
		cout<<"Pls try again!!!\n";
		cin>>password;
	}
	do{
		cout<<"\n";
		cout<<"           ***MOGOL***\n";
		cout<<"*** Automated Teller Machine***"<<endl;
		cout<<"Choose a Transaction:\n";
		cout<<"\n";
		cout<<"[1] Inquire Balance \n"
			<<"[2] Withdraw \n"
			<<"[3] Deposit \n"
			<<"[4] Quit \n"
			<<"\n"
			<<"Enter Option:";
		cin>>option;

		switch(option)
		{
		case 1:
			cout<<"\n[[[BALANCE INQUIRY]]]\n";
			cout.setf(ios::fixed);
			cout.setf(ios::showpoint);
			cout.precision(2);
			cout<<"\n Your current balance is $"<<balance<<endl;
			break;
		case 2:
			cout<<"\n[[[WITHDRAW]]]\n";
			cout<<"Enter amount: $";
			cin>>withdraw;

			balance = balance - withdraw;

			cout.setf(ios::fixed);
			cout.setf(ios::showpoint);
			cout.precision(2);

			cout<<"You withdrew $"<<withdraw<<endl;
			cout<<"Your remaining balance is $"<<balance<<endl;
			continue;
		case 3:
			cout<<"\n[[[DEPOSIT]]]\n";
			cout<<"Enter amount: $";
			cin>>deposit;

			balance = balance + deposit;

			cout.setf(ios::fixed);
			cout.setf(ios::showpoint);
			cout.precision(2);

			cout<<"You deposited $"<<deposit<<endl;
			cout<<"Your new balance is $"<<balance<<endl;
			continue;
		case 4:
			cout<<"\n***[[[EXIT MODE]]]***\n";

			break;


		default:
			cout<<"\n That is an invalid option \n";
		}
		}while(option!=4);


			return 0;
	}//
#7

هيك الكود صحيح

عن جد الله بعين

تم تعديل هذه المشاركة بواسطة ♥ حُوريّة ♥ في 2 أبريل 2011 في 08:22

[وسط]

♥ Countess ♥

57899411.gif

♥

[/وسط]

#8

الله يجزااااك الجنة ويعطيك لما يرضيك وربي ماتعرف قد ايش ساعدتني ياااااااااارب يحقق لك كل اللي تتمناه

من جد يعطيك الف عااااااااااافيه :blush: :blush:

مواضيع مشابهة