fork download
  1. #include <iostream> //
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. float n1=0;
  7. float n2=0;
  8. float n3=0;
  9. float suma=0;
  10. cout << " Ingrese n1 " << endl ;
  11. cin >> n1;
  12. cout << " Ingrese n2 " << endl ;
  13. cin >> n2;
  14. cout << " Ingrese n3 " << endl ;
  15. cin >> n3;
  16. suma=n1+n2+n3;
  17. cout << "La suma de los numeros ingresados es:" <<suma<< endl ;
  18. return 0;
  19.  
  20. }
  21.  
  22.  
Success #stdin #stdout 0s 5320KB
stdin
2.2 1 3
stdout
 Ingrese n1 
 Ingrese n2 
 Ingrese n3 
La suma de los numeros ingresados es:6.2