Powered by Blogger.

Shopping Cart Details


Order Details Amount
GRAND TOTAL:

Please choose a checkout option.
No personal data required.

Send in Orders

It's Quick & Easy! Details here will not be published.

Please include messages to us here.

Checkout

Popular Posts

Flowchat dan Program Konversi Hari

  

Algoritma Pemograman - Flowchat dan Program Konversi Hari | Postingan kali ini saya share tentang Permasalahan Konversi Hari. Ketentuan yang harus dipenuhi yaitu :


Angka
Outputnya
1
Senin
2
Selasa
3
Rabu
4
Kamis
5
Jumat
6
Sabtu
7
Minggu

Dari ketentuan diatas pertama kita buat flowchatnya dengan bantuan software raptor, menjadi :



Dari Flochart diatas kita masukan ke salah satu kompiler, disini saya menggunakan dev C++ :


#include <iostream>
#include <string>

using namespace std;
int main()
{
   string raptor_prompt_variable_zzyz;
   int nilai;
   char* z;

   raptor_prompt_variable_zzyz ="Masukan Nilai Yang Akan Dikonversikan = ";
   cout << raptor_prompt_variable_zzyz << endl;
   cin >> nilai;
   if (nilai>0 && nilai<=20)
   {
      z ="E";
   }
   else
   {
      if (nilai>20 && nilai<=40)
      {
         z ="D";
      }
      else
      {
         if (nilai>40 && nilai<=60)
         {
            z ="C";
         }
         else
         {
            if (nilai>60 && nilai<=80)
            {
               z ="B";
            }
            else
            {
               z ="A";
            }
         }
      }
   }
   cout << "Konversi nilai dari " <<nilai <<" yaitu "<<z << endl;
   system("pause");
   return 0;
}

No comments yet. Add your comments now!

Post a Comment




Instagram ROACH


Info Section Text