Advertisement
Abelsor

S3_Ejercicio_2

Feb 23rd, 2023 (edited)
638
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main(){
  4.     float nf;
  5.     cin>>nf;// no modifique la instrucción de lectura
  6.    
  7.     while(nf != int(nf) or nf<0){
  8.         cin>>nf;
  9.     }
  10.    
  11.     cout<<nf*nf;
  12.     return 0;// no utilize system(pause)
  13.    
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement