Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3. using namespace std;
  4. int main()
  5. {
  6. int Age1,ID1,Age2,ID2,Age3,ID3;
  7. float Total1,Total2,Total3;
  8. ofstream Record1("R1.txt");
  9. ofstream Record2("R2.txt");
  10. ofstream Record3("R3.txt");
  11. cout<<"Enter ID:";
  12. cin>>ID1;
  13. cout<<"Enter age:";
  14. cin>>Age1;
  15. cout<<"Enter Total percentage:";
  16. cin>>Total1;
  17. Record1<<ID1<<endl<<Age1<<endl<<Total1;
  18. cout<<"Enter ID:";
  19. cin>>ID2;
  20. cout<<"Enter age:";
  21. cin>>Age2;
  22. cout<<"Enter Total percentage:";
  23. cin>>Total2;
  24. Record2<<ID2<<endl<<Age2<<endl<<Total2;
  25.  
  26. cout<<"Enter ID:";
  27. cin>>ID3;
  28. cout<<"Enter age:";
  29. cin>>Age3;
  30. cout<<"Enter Total percentage:";
  31. cin>>Total3;
  32. Record3<<ID3<<endl<<Age3<<endl<<Total3;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement