dsr95

C++ lab 2.2 (2B)

Dec 17th, 2014
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. // lab 2.2 (2B) dsr.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6.  
  7.  
  8. using namespace std;
  9.  
  10.  
  11. int main()
  12. {
  13. int Num1;
  14. int Num2;
  15. int Num3;
  16. int Num4;
  17. int Resultado;
  18.  
  19. cout << "Favor de ingresar el primer numero. ";
  20. cin >> Num1;
  21. cout << "Favor de ingresar el segundo numero. ";
  22. cin >> Num2;
  23. cout << "Favor de ingresar el tercer numero. ";
  24. cin >> Num3;
  25. cout << "Favor de ingresar el cuarto numero. ";
  26. cin >> Num4;
  27.  
  28. Resultado = Num1 + Num2 + Num3 + Num4;
  29.  
  30. cout << "El total es: " << Resultado;
  31.  
  32.  
  33. system("PAUSE");
  34.  
  35. return 0;
  36. }
  37. int main()
  38. {
  39. int Num1;
  40. int Num2;
  41. int Num3;
  42. int Num4;
  43. int Resultado;
  44.  
  45. cout << "Favor de ingresar el primer numero. ";
  46. cin >> Num1;
  47. cout << "Favor de ingresar el segundo numero. ";
  48. cin >> Num2;
  49. cout << "Favor de ingresar el tercer numero. ";
  50. cin >> Num3;
  51. cout << "Favor de ingresar el cuarto numero. ";
  52. cin >> Num4;
  53.  
  54. Resultado = Num1 + Num2 + Num3 + Num4;
  55.  
  56. cout << "El total es: " << Resultado;
  57.  
  58.  
  59. system("PAUSE");
  60.  
  61. return 0;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment