Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- char alpha;
- cout<<"***********************************************\n";
- cout<<"\nInput the first letter then display 2 countries";
- cout<<"\nstarts with the chosen letter.\n";
- cout<<"\n***********************************************\n";
- cout<<"\nInput first letter: ";
- cin>>alpha;
- cout<<"\n***********************************************\n\n";
- if (alpha=='A' || alpha=='a')
- {
- cout<<"1.Afghanistan"<<endl;
- cout<<"2.Andorra";
- }
- else if (alpha=='B' || alpha=='b')
- {
- cout<<"1.Belgium"<<endl;
- cout<<"2.Barium";
- }
- else if (alpha=='C' || alpha=='c')
- {
- cout<<"1.Cameroonn"<<endl;
- cout<<"2.Cambodia";
- }
- else if (alpha=='D' || alpha=='d')
- {
- cout<<"1.Denmark"<<endl;
- cout<<"2.Djiboutim";
- }
- else if (alpha=='E' || alpha=='e')
- {
- cout<<"1.Estonia"<<endl;
- cout<<"2.Ethiopia";
- }
- else if (alpha=='F' || alpha=='f')
- {
- cout<<"1.Finland"<<endl;
- cout<<"2.France";
- }
- else if (alpha=='G' || alpha=='g')
- {
- cout<<"1.Germany"<<endl;
- cout<<"2.Greece";
- }
- else if (alpha=='H' || alpha=='h')
- {
- cout<<"1.Honduras"<<endl;
- cout<<"2.Hungary";
- }
- else if (alpha=='I' || alpha=='i')
- {
- cout<<"1.Iran"<<endl;
- cout<<"2.Iraq";
- }
- else if (alpha=='J' || alpha=='j')
- {
- cout<<"1.Japan"<<endl;
- cout<<"2.Jordan";
- }
- else if (alpha=='K' || alpha=='k')
- {
- cout<<"1.Kazakhstan"<<endl;
- cout<<"2.Kuwait";
- }
- else if (alpha=='L' || alpha=='l')
- {
- cout<<"1.Laos"<<endl;
- cout<<"2.Libya";
- }
- else if (alpha=='M' || alpha=='m')
- {
- cout<<"1.Malawi"<<endl;
- cout<<"2.Madagascar";
- }
- else if (alpha=='N' || alpha=='n')
- {
- cout<<"1.Netherlands"<<endl;
- cout<<"2.Nigeria";
- }
- else if (alpha=='O' || alpha=='o')
- {
- cout<<"1.Oman"<<endl;
- cout<<"2.Omen of Truth";
- }
- else if (alpha=='P' || alpha=='p')
- {
- cout<<"1.Poland"<<endl;
- cout<<"2.Principe";
- }
- else if (alpha=='Q' || alpha=='q')
- {
- cout<<"1.Qatar"<<endl;
- cout<<"2.Qatastrophe";
- }
- else if (alpha=='R' || alpha=='r')
- {
- cout<<"1.Reunion"<<endl;
- cout<<"2.Romania";
- }
- else if (alpha=='S' || alpha=='s')
- {
- cout<<"1.Samoa"<<endl;
- cout<<"2.Sierra Leone";
- }
- else if (alpha=='T' || alpha=='t')
- {
- cout<<"1.Thailand"<<endl;
- cout<<"2.Timor Leste";
- }
- else if (alpha=='U' || alpha=='u')
- {
- cout<<"1.Uganda"<<endl;
- cout<<"2.United States of America (USA)";
- }
- else if (alpha=='V' || alpha=='v')
- {
- cout<<"1.Vietnam"<<endl;
- cout<<"2.Venezuela";
- }
- else if (alpha=='Y' || alpha=='y')
- {
- cout<<"1.Yemen"<<endl;
- cout<<"2.Yeboy";
- }
- else if (alpha=='Z' || alpha=='z')
- {
- cout<<"1.Zambia"<<endl;
- cout<<"2.Zimbabwe";
- }
- else
- {
- cout<<"Invalid Input!!!\n";
- cout<<"Valid input is Aa-Zz";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement