100% SWITCH ఉదాహరణ
// program to demonstrate the use of Switch in choosing department
#include <stdio.h>
void main()
{
char choice;
printf("\n enter M for mech, E for EEE, C for Civil, I for IT");
scanf("%c", &choice);
switch(choice)
{
case'M': printf("\n Do all problems in Engg mechanics by Bansal ");
break;
case'E': printf("\n Do all problems in Thereja book");
printf("\n understand how VTPS & KTPS works");
break;
case'I': printf("\n whatever subject u choose, be a master of it");
break;
case'C': printf("\n visit Nagarjuna sagar project");
// break; // break is not required in the last 'case'
} // end of switch
}//end of main
#include <stdio.h>
void main()
{
char choice;
printf("\n enter M for mech, E for EEE, C for Civil, I for IT");
scanf("%c", &choice);
switch(choice)
{
case'M': printf("\n Do all problems in Engg mechanics by Bansal ");
break;
case'E': printf("\n Do all problems in Thereja book");
printf("\n understand how VTPS & KTPS works");
break;
case'I': printf("\n whatever subject u choose, be a master of it");
break;
case'C': printf("\n visit Nagarjuna sagar project");
// break; // break is not required in the last 'case'
} // end of switch
}//end of main
ఔట్పుట్ ఈ కింద ఉన్నది
enter M for mech, E for EEE, C for Civil, I for IT E
E
Do all problems in Thereja book
understand how VTPS & KTPS works
E
Do all problems in Thereja book
understand how VTPS & KTPS works
కామెంట్లు
కామెంట్ను పోస్ట్ చేయండి
దయచేసి మీ సలహాలను సూచనలను స్పష్టంగా పేర్కొనగలరు. plz see that ur comments are 'acceptable' in a value based society.