PDA

View Full Version : حرفه ای: برنامه یc++



nasim74
چهارشنبه 31 شهریور 1395, 08:55 صبح
سلام برنامه ی زیر برنامه ی یک عابربانکه که با تابع نوشته شده میخواستم ببینم درسته؟
اگه درسته توضیحش بدید و بگید با چه نرم افزاری تستش کردی// ConsoleApplication20.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
using namespace std;
void ramz() {

int password = 1234;
int input;
do {
cout « "enter your password>" « flush;
cin » input;
if (input != password)
cout « "access denied" « endl;
} while (input != password);
cout « "password accepted" « endl;
}
void menu() {
cout « "1/namayeshe mojodi" « endl;
cout « "2/daryafte vajh" « endl;
}
int main()
{
cout«"hello welcome"«endl;
ramz();
menu();
int value;
cin » value;
if (value == 1)
cout « "mojodi shoma 1000000R ast." « endl;
if (value == 2) {
cout « "cheghad mikhayd?" « endl;
int money;
cin » money;
if (money < 1000000) {
int mojodi = 1000000;
cout « "mojodi jadide shoma" « mojodi - money « endl;
}
else
cout « "mablagh ghabele bardasht nist" « endl;

}

return 0;
}ن و عکسشو واسم بفرستین ممنونم:لبخندساده:

one hacker alone
جمعه 16 مهر 1395, 07:21 صبح
کد رو تو تگ code بزارید و بگید و یه توضیحاتی در موردش بدید تا بهتر کدخونده بشه