akbarbasya26

praktek 1

Mar 1st, 2020
148
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data