Advertisement
schreiberstein

alexisacbeginner

Jul 30th, 2011
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.  
  5. int alex;
  6. int katja;
  7. void exit( int exit_code );
  8.  
  9. printf("Welche Note hatte noch mal Alex in Mathe?\n");
  10. scanf("%i", &alex);
  11. if (alex >= 7) {
  12. printf("\n Bitte beim nächsten mal ernst bleiben! \n");
  13. exit(1);
  14. }
  15.  
  16. if (alex <= 0) {
  17. printf("\n Bitte beim nächsten mal ernst bleiben! \n");
  18. exit(1);
  19. }
  20.  
  21. printf("\n Welche Note hatte Katja noch mal in Mathe? \n");
  22. scanf("%i", &katja);
  23. if (katja >= 7) {
  24. printf("\n Bitte beim nächsten mal ernst bleiben! \n");
  25. exit(1);
  26. }
  27.  
  28. if (katja <= 0) {
  29. printf("\n Bitte beim nächsten mal ernst bleiben! \n");
  30. exit(1);
  31. }
  32.  
  33. printf("\n Alex hat eine %i in Mathe. \n", alex);
  34. printf("\n Katja hat eine %i in Mathe. \n", katja);
  35.  
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement