Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4.  
  5. int main(int ile, char *argumenty[])
  6. {
  7. double suma = 0;
  8.  
  9. for (int i = 1; i < ile; i++)
  10. {
  11. suma += atof(argumenty[i]);
  12. }
  13.  
  14. cout << endl << "Podales " << ile - 1 << " liczb" << endl;
  15. cout << "Suma podanych liczb to: " << suma << endl << endl;
  16.  
  17. system("pause");
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement