#include<iostream> uing namespace std; int main(){ int y; while(cin>>y)!=EOF){ if((y%4==0 && y%100!=0) || (y%400==0)){ cout<<"Leap Year"<<endl; } else{ cout<<"Not Leap Year"<<endl; } } return 0; } /* Main.cc:2:1: error: 'uing' does not name a type; did you mean 'uint'? uing namespace std; ^~~~ uint Main.cc: In function 'int main()': Main.cc:5:12: error: 'cin' was not declared in this scope while(cin>>y)!=EOF){ ^~~ Main.cc:5:12: note: suggested alternative: In file included from Main.cc:1: /usr/include/c++/8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^~~ Main.cc:5:19: error: expected primary-expression before '!=' token while(cin>>y)!=EOF){ ^~ */ |
Double click to view unformatted code.