Guest
Public paste!

leo

By: a guest | Feb 9th, 2010 | Syntax: C++ | Size: 0.49 KB | Hits: 32 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.  
  5. const double strykGrense = 10;
  6.  
  7. double del1;
  8. double del2;
  9. double del3;
  10.  
  11. cout << "Vennligst skriv de tre resultatene mellom 0.0 og 20.0: " << endl;
  12. cin >> del1 >> del2 >> del3 ;
  13.  
  14. double totalPoeng;
  15. totalPoeng = del1 + del2 + del3;
  16. totalPoeng = totalPoeng / 3.0;
  17.  
  18. cout << "Total Poeng: " << totalPoeng << endl;
  19.  
  20. if (totalPoeng < strykGrense) {
  21. cout << "STRYK!" << endl;
  22. } else {
  23. cout << "BESTÅTT!" << endl;
  24. }
  25. return 0;
  26. }