البرنامج هو ::
write a C++ programe that :
display on the screen a nice title and a name as well
the programe reads from standard input stream (keyboard in this case) an integer value of six digits .for example :120704 or 31103(meaning 031103
this number is date . it is to be spilt as follows : the first two digits represent the day then the next two are the month and finally the last two are the year of century
for example : for 120704 the day is 12 the month is 7 and theyear is 4 for 31103 the day is 3 the month is 11 and the year is 3
display on screen the day as follows:
the date is 12 july 2004 for input 120704
or the date is 3 november 2003 for input 31103
if the date is not correct such as 420804 or 141404
هذا الي طلع معي:
#include <iostream.h>
void main ( ) {
int number,D, day, month, year, f, a;
cout << "\n\t TaMeR SaEeD \n\n ";
cout << "\n\n Enter Your Numbers \n";
cout << "\n The Date Will Appear To You\n:";
cin >> number;
D = number;
day = number / 10000;
number = number % 10000;
if (day<=31)
cout << "\n" << day;
if (day>=31)
cout << "\n ???????? ";
month = number / 100;
number = number % 100;
if (month==1)
cout << " January ";
if (month==2)
cout << " February ";
if (month==3)
cout << " March ";
if (month==4)
cout << " April ";
if (month==5)
cout << " May ";
if (month==6)
cout << " June ";
if (month==7)
cout << " July ";
if (month==8)
cout << " August ";
if (month==9)
cout << " September ";
if (month==10)
cout << " October ";
if (month==11)
cout << " November ";
if (month==12)
cout << " December ";
year = number % 100;
f = year + 1900;
if (year>=80)
cout << f << "\n\n";
a = year + 2000;
if (year<=10)
cout << a << "\n\n";
}
لكن ما زبط معي ايش الغلط والله ماني عارف ؟؟؟؟؟