#include
using namespace std;
int main(){
int no;
while(scanf("%d",&no)!=EOF)
{
cout<<no*no<<endl;
}
return 0;
}
IT IS RUNNIG INFINITELY
#include
using namespace std;
int main(){
int no;
while(scanf("%d",&no)!=EOF)
{
cout<<no*no<<endl;
}
return 0;
}
IT IS RUNNIG INFINITELY
hey @sagar_aggarwal you need to compate no with EOF, but you are comparing whatever scanf returns so take the input inside the while loop and then compare no with EOF
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.