KinekaruFounder

INPUT S1 / D3

Oct 7th, 2022
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. // Online C++ compiler to run C++ program online
  2. #include <iostream>
  3. #include <string.h>
  4. using namespace std;
  5.  
  6. char jenjang[5],kodep[5];
  7.  
  8. main() {
  9.  
  10. cout <<"Input jenjang : ";
  11. cin>>jenjang;
  12.  
  13. if(strcmp(jenjang, "s1")==0 || strcmp(jenjang, "S1")==0)
  14. {
  15. cout <<"A11 = TI \n";
  16. cout <<"A12 = SI \n";
  17. cout <<"A14 = DKV \n";
  18.  
  19. cout <<"input kode prodi : ";
  20. cin>>kodep;
  21.  
  22. if (strcmp(kodep,"A11")==0 || strcmp(kodep,"a11")==0)
  23. {
  24. cout <<"Anda mahasiswa TI";
  25. }else if (strcmp(kodep,"A12")==0 || strcmp(kodep,"a12")==0)
  26. {
  27. cout <<"Anda mahasiswa Ssitem informasi";
  28. }
  29. }else if(strcmp(jenjang, "d3")==0 || strcmp(jenjang, "D3")==0)
  30. {
  31. cout <<"D11 = TI \n";
  32. cout <<"D12 = sitem informasi \n";
  33. cout <<"D14 = DKV \n";
  34.  
  35. cout <<"input kode prodi : ";
  36. cin>>kodep;
  37.  
  38. if (strcmp(kodep,"D11")==0 || strcmp(kodep,"d11")==0)
  39. {
  40. cout <<"Anda mahasiswa d3 TI";
  41. }else if (strcmp(kodep,"d12")==0 || strcmp(kodep,"D12")==0)
  42. {
  43. cout <<"Anda mahasiswa d3 sistem informasi";
  44. }
  45. }
  46.  
  47.  
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment