﻿

# Untitled

a guest
Dec 5th, 2019
74
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. #include <iostream>
2. #include <fstream>
3. #include <iomanip>
4. #include <string>
5.
6. using namespace std;
7.
8. double Find_Highest(double A, double B, double C, double D, double E);
9. double Find_Lowest(double A, double B, double C, double D, double E);
10. double Calculate_Score(double A, double B, double C, double D, double E);
11.
12. int main()
13. {
14. ofstream outfile;
15. outfile.open("outfile.txt");
16. ifstream infile;
17. infile.open("infile.txt");
18. outfile << "Tayton Rose\n" << endl;
19. outfile << setw(8) << "Name" << setw(18) << "Avg.Score" << setw(34) << "Judges' Scores\n";
20. outfile << setw(38) << "#1" << setw(8) << "#2" << setw(8) << "#3" << setw(8) << "#4" << setw(8) << "#5\n";
21. outfile << "-----------------------------------------------------------------------\n";
22. int count = 0,x = 0;
23. double score1, score2, score3, score4, score5;
24. string name;
25.
26. while (count >= x)
27. {
28. outfile << fixed << setprecision(2);
29. infile >> name >> score1 >> score2 >> score3 >> score4 >> score5;
30. outfile << name << setw(31) <<score1 <<setw(8)<< score2 << setw(8) <<score3 << setw(8) << score4 << setw(8) <<score5 <<endl;
31. count++;
32. }
33.
34. outfile.close();
35. infile.close();
36.
37. return 0;
38. }
39. double Calculate_Score(double A, double B, double C, double D, double E)
40. {
41.
42. }
43.
44. double Find_Lowest(double A, double B, double C, double D, double E)
45. {
46. int low;
47.
48. if (A < B)
49. A = low;
50. else if (A < C)
51. A = low;
52. else if (A < D)
53. A = low;
54. else if (A < E)
55. A = low;
56. if (B < A)
57. B = low;
58. if (B < C)
59. B = low;
60. if (B < D)
61. B = low;
62. if (B < E)
63. B = low;
64.
65.
66. }
67.
68. double Find_Highest(double A, double B, double C, double D, double E)
69. {
70.
71. }
RAW Paste Data