Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream.h>
- #include <conio.h>
- #include <windows.h>
- void main()
- {
- char pilihan;
- cout<<"\n Mewarnai di C++ ";
- cout<<"\n Have fun with c++ ";
- cout<<"\n Pilihan Warna yang tersedia : ";
- cout<<"\n 1.Blue ";
- cout<<"\n 2.Green ";
- cout<<"\n 3.Aqua ";
- cout<<"\n 4.Red ";
- cout<<"\n Masukan Pilihan Warna mu : ";
- cin>>pilihan;
- if(pilihan == 'a')
- {
- system("color 1");
- cout<<"Ini warna Blue ";
- }
- else if(pilihan == 'b')
- {
- system("color 2");
- cout<<"Ini warna Green ";
- }
- else if(pilihan == 'c')
- {
- system("color 3");
- cout<<"Ini warna Aqua ";
- }
- else if(pilihan == 'd')
- {
- system("color 4");
- cout<<"Ini warna Red ";
- }
- else
- {
- cout<<"Pilihan tidak tersedia ";
- }
- getch();
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment