Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. //
  2. // main.cpp
  3. // grade.cpp
  4. //
  5. // Created by Örvar Blær Guðmundsson on 01/09/2015.
  6. // Copyright (c) 2015 Örvar Blær Guðmundsson. All rights reserved.
  7. //
  8.  
  9. #include <iostream>
  10. using namespace std;
  11.  
  12. int main()
  13. {
  14. int a;
  15. double b;
  16. double c;
  17.  
  18. cout << "How many exercises to input: ";
  19. cin >> a;
  20. if (a <= 0)
  21. {
  22. cout << "Input at least one exercise!";
  23. }
  24. else
  25. {
  26. do {
  27. cout << "Score received for exercise 1: " << endl;
  28. cin >> b;
  29. cout << "Total points possible for exercise 1: " << endl;
  30. cin >> c;
  31. }
  32.  
  33. while (a <= 0); {
  34. cout << "Total points possible for exercise 2: " << endl;
  35. cin >> b;
  36. }
  37.  
  38. return 0;
  39. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement