Advertisement
Guest User

xDED

a guest
Apr 27th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. string wyraz;
  8. ifstream plik("liczby.txt");
  9. if(plik.good() == true)
  10. {
  11. while(!plik.eof())
  12. {
  13.  
  14. plik >> wyraz;
  15. cout << wyraz << endl;
  16. cyfra[0]=liczba/100;
  17. liczba=liczba%100;
  18. cyfra[1]=liczba/10;
  19. liczba=liczba%10;
  20. cyfra[2]=liczba/1;
  21. liczba=liczba%1;
  22. suma=cyfra[0]+cyfra[1]+cyfra[2];
  23.  
  24. }
  25. plik.close();
  26. }
  27.  
  28.  
  29.  
  30. cin.ignore();
  31. getchar();
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement