find mistake

View previous topic View next topic Go down

find mistake

Post by BIT0112-Rokon on Mon Apr 05, 2010 11:09 am

Code:
#include <conio.h>
using namespace std;

void OS_Solaris_print()
{
cout<<"Solaris - Sun Microsystems\n";
}

void OS_Windows_print()
{
cout<<"Windows - Microsoft\n";

}
void OS_HP-UX_print()
{
cout<<"HP-UX - Hewlett Packard\n";
}

int main()
{
int num;
cout<<"Enter the number (1-3):\n";
cin>>num;
switch(num)
{
case 1:
OS_Solaris_print();
break;
case 2:
OS_Windows_print();
break;
case 3:
OS_HP-UX_print();
break;
default:
printf("Hmm! only 1-3 :-)\n");
break;
}
getch();
return 0;
}


There is a silly mistake.. can you find it..?

_________________________________________________________________


Code Explosion Blog | Code Explosion Wiki | The Rokonoid | নির্ঝরিণী
avatar
BIT0112-Rokon
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : O+
Posts : 673
Points : 1269

View user profile http://blog.codexplo.org

Back to top Go down

Re: find mistake

Post by BIT0122-Amit on Mon Apr 19, 2010 12:44 am

answer sent to private message. check it out Smile

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.

|About me|My Blog|
avatar
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

View user profile http://iitdu.forumsmotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum