+ 1
I wrote this code but there is something wrong with the output of months and days
2 odpowiedzi
+ 6
#include <iostream>
using namespace std;
int main ()
{
int year ,month , day ;
cin>> year>> month>> day ;
int a=2017 ,b = 12 ,c = 19 ;
cout << a-year << " years"<< endl;
cout << b-month << " month"<< endl;
if (day <19){
cout << 19-day << endl;
}
else {
cout <<31-day << endl;
}
return 0;
}
do like this you miss at this place
cin>> year>> month>> day ;
+ 1
yeah it worked ! thanks alllot