Advertisement
Loan198

Untitled

Nov 24th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. void grade10(const char* path)
  2. {
  3. ifstream file(path);
  4. if ( file.is_open())
  5. {
  6. string temp;
  7. getline( file,temp);
  8. while (!file.eof())
  9. {
  10. string s;
  11. getline( file,s);
  12. int n = s.length();
  13. while (s[n-1] != ',') n--;
  14. int kt=0;
  15. if ( s[n-2] == '0') kt =1;
  16. if ( kt)
  17. {
  18. int k =1;
  19. while ( s[k] != ',') k++;
  20. while (s[k+1] != ',') {
  21. cout<< s[k+1];
  22. k++;
  23. }
  24. cout<< " ";
  25. k++;
  26. while (s[k+1] != ',') {
  27. cout<< s[k+1];
  28. k++;
  29. }
  30. cout<< endl;
  31. }
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement