Advertisement
Guest User

unti.cpp

a guest
Aug 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.79 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4.  
  5. {
  6.    
  7.     char alpha;
  8.    
  9.     cout<<"***********************************************\n";
  10.     cout<<"\nInput the first letter then display 2 countries";
  11.     cout<<"\nstarts with the chosen letter.\n";
  12.     cout<<"\n***********************************************\n";
  13.    
  14.     cout<<"\nInput first letter: ";
  15.     cin>>alpha;
  16.    
  17.     cout<<"\n***********************************************\n\n";
  18.    
  19.     if (alpha=='A' || alpha=='a')
  20.     {
  21.         cout<<"1.Afghanistan"<<endl;
  22.         cout<<"2.Andorra";
  23.     }
  24.     else if (alpha=='B' || alpha=='b')
  25.     {
  26.         cout<<"1.Belgium"<<endl;
  27.         cout<<"2.Barium";
  28.     }
  29.     else if (alpha=='C' || alpha=='c')
  30.     {
  31.         cout<<"1.Cameroonn"<<endl;
  32.         cout<<"2.Cambodia";
  33.     }
  34.     else if (alpha=='D' || alpha=='d')
  35.     {
  36.         cout<<"1.Denmark"<<endl;
  37.         cout<<"2.Djiboutim";
  38.     }
  39.         else if (alpha=='E' || alpha=='e')
  40.     {
  41.         cout<<"1.Estonia"<<endl;
  42.         cout<<"2.Ethiopia";
  43.     }
  44.     else if (alpha=='F' || alpha=='f')
  45.     {
  46.         cout<<"1.Finland"<<endl;
  47.         cout<<"2.France";
  48.     }
  49.     else if (alpha=='G' || alpha=='g')
  50.     {
  51.         cout<<"1.Germany"<<endl;
  52.         cout<<"2.Greece";
  53.     }
  54.         else if (alpha=='H' || alpha=='h')
  55.     {
  56.         cout<<"1.Honduras"<<endl;
  57.         cout<<"2.Hungary";
  58.     }
  59.     else if (alpha=='I' || alpha=='i')
  60.     {
  61.         cout<<"1.Iran"<<endl;
  62.         cout<<"2.Iraq";
  63.     }
  64.     else if (alpha=='J' || alpha=='j')
  65.     {
  66.         cout<<"1.Japan"<<endl;
  67.         cout<<"2.Jordan";
  68.     }
  69.     else if (alpha=='K' || alpha=='k')
  70.     {
  71.         cout<<"1.Kazakhstan"<<endl;
  72.         cout<<"2.Kuwait";
  73.     }
  74.     else if (alpha=='L' || alpha=='l')
  75.     {
  76.         cout<<"1.Laos"<<endl;
  77.         cout<<"2.Libya";
  78.     }
  79.     else if (alpha=='M' || alpha=='m')
  80.     {
  81.         cout<<"1.Malawi"<<endl;
  82.         cout<<"2.Madagascar";
  83.     }
  84.         else if (alpha=='N' || alpha=='n')
  85.     {
  86.         cout<<"1.Netherlands"<<endl;
  87.         cout<<"2.Nigeria";
  88.     }
  89.     else if (alpha=='O' || alpha=='o')
  90.     {
  91.         cout<<"1.Oman"<<endl;
  92.         cout<<"2.Omen of Truth";
  93.     }
  94.     else if (alpha=='P' || alpha=='p')
  95.     {
  96.         cout<<"1.Poland"<<endl;
  97.         cout<<"2.Principe";
  98.     }
  99.         else if (alpha=='Q' || alpha=='q')
  100.     {
  101.         cout<<"1.Qatar"<<endl;
  102.         cout<<"2.Qatastrophe";
  103.     }
  104.     else if (alpha=='R' || alpha=='r')
  105.     {
  106.         cout<<"1.Reunion"<<endl;
  107.         cout<<"2.Romania";
  108.     }
  109.     else if (alpha=='S' || alpha=='s')
  110.     {
  111.         cout<<"1.Samoa"<<endl;
  112.         cout<<"2.Sierra Leone";
  113.     }
  114.         else if (alpha=='T' || alpha=='t')
  115.     {
  116.         cout<<"1.Thailand"<<endl;
  117.         cout<<"2.Timor Leste";
  118.     }
  119.     else if (alpha=='U' || alpha=='u')
  120.     {
  121.         cout<<"1.Uganda"<<endl;
  122.         cout<<"2.United States of America (USA)";
  123.     }
  124.         else if (alpha=='V' || alpha=='v')
  125.     {
  126.         cout<<"1.Vietnam"<<endl;
  127.         cout<<"2.Venezuela";
  128.     }
  129.     else if (alpha=='Y' || alpha=='y')
  130.     {
  131.         cout<<"1.Yemen"<<endl;
  132.         cout<<"2.Yeboy";
  133.     }
  134.     else if (alpha=='Z' || alpha=='z')
  135.     {
  136.         cout<<"1.Zambia"<<endl;
  137.         cout<<"2.Zimbabwe";
  138.     }
  139.     else
  140.     {
  141.         cout<<"Invalid Input!!!\n";
  142.         cout<<"Valid input is Aa-Zz";
  143.     }
  144.         return 0;
  145.    
  146.    
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement