JUN7

praktek 1

Mar 8th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. using namespace std;
  4.  
  5. main()
  6. {
  7.     float nilai, kuis, praktek, UAS;
  8.     printf("Masukan kuis  : "); scanf("%f", &kuis );
  9.     printf("Masukan praktek : "); scanf("%f", &praktek );
  10.     printf("Masukan UAS : "); scanf("%f", &UAS );
  11.     nilai = (kuis + praktek + UAS )/3;
  12.  
  13.     if (nilai >80){
  14.         printf ("Lulus");
  15.     }else if (nilai >60){
  16.         printf ("Mengulang");
  17.     }else{
  18.         printf ("Tidak Lulus");
  19.     }
  20.     getch();
  21. }
Add Comment
Please, Sign In to add comment