C++ Romawi

#include<iostream>
#include<conio.h>
main(){
int bil;
  while(bil!=0){
    cout<<"masukan pilihan [1..10] :";
  cin>>bil;
  cout<<"\n";
  switch(bil){
  case 1 :cout<<" Romawi : I\n"<<endl;
  break;
  case 2 :cout<<" Romawi : II\n"<<endl;
  break;
  case 3 :cout<<" Romawi : III\n"<<endl;
  break;
  case 4 :cout<<" Romawi : IV\n"<<endl;
  break;
  case 5 :cout<<" Romawi : V\n"<<endl;
  break;
  case 6 :cout<<" Romawi : VI\n"<<endl;
  break;
  case 7 :cout<<" Romawi : VII\n"<<endl;
  break;
  case 8 :cout<<" Romawi : VIII\n"<<endl;
  break;
  case 9 :cout<<" Romawi : IX\n"<<endl;
  break;
  case 10:cout<<" Romawi : X\n"<<endl;
  break;
      }
   }
  getch();
}

0 Response to "C++ Romawi"

Posting Komentar