C++ PROGRAM problem

plz can any one vreate or help me in creating program dat works lyk dat
if we enter any abrivation lyk TCP its output comes out Tranmission Control Protocol..................


plz plz plz someone help me in
I could not understand what you said....
\\lyk in the compiler i give

TCP

\\and in answer it gives

Tranmission Control Protocol
plz plz plz.... what a joke. This is such a basic question. Let us see what you have so far before we help. You're not going to be handed the assignment. And speak ENGLISH!!! plz lyk dat are not words.
can any one help me out about it ????????????
Are you kidding us?
i hae created that one but i have to give abrivations like TCp and SAD not the no like 1 2 3,and have to repeat it again anf again 5 times

#include<iostream.h>
#include<conio.h>

class abb
{
public:
int i;
int choice;
clrscr( );
void test()
{
cout << "enter your choice ";
cout << "\n1 ====> FTP\n2 ====> HTTP";
cout << "\n3 ====> DLD\n4 ====> OOP";
cout << "\n5 ====> LAN\n6 ====> WAN";
cout << "\n7 ====> SAD\n8 ====> IP";
cout << "\n9 ====> SPM\n";

cin >> choice;
switch(choice)
{
case 1:
cout <<"File Transfer Protocol";
break;
case 2:
cout <<"Hyper Text Transfer Protocol";
break;
case 3:
cout <<"Digital Logic Design";
break;
case 4:
cout <<"Object Oriented Programming";
break;
case 5:
cout <<"Local Area Network";
break;
case 6:
cout <<"Wide Area Network";
break;
case 7:
cout <<"Software Analysis Design";
break;
case 8:
cout <<"Internet Protocol";
break;
case 9:
cout <<"Software Project Management";
break;
default:
cout<<"Invalid Selection";
}}
};
void main()
{
abb p;
p.test();
getch( );
}
It looks like you completely ignored the advice Return 0 gave you in the duplicate thread, so this might be pointless, but you just need to process strings instead of ints:

1
2
3
4
5
std::string s;
std::cin >> s;
// you might want to convert it to lower case
if(s == "ftp") std::cout << "File Transfer Protocol";
// and so on... 
Topic archived. No new replies allowed.