0
How I can create program in C# with the help of "if statement" like a utility store ?
e.g 1 . biscuits, 2 . chips, 3 . chocolates and press 1 show the items biscuit .
7 Answers
+ 1
Ok here, an example.
Int choice ;
Cout<<'' please make your choice ''<<endl<<
"1. Biscuits"<<endl<<"2. Chocolate"<<endl;
Cin>>choice;
If(choice==1){
Cout<<"biscuit"<<endl;
}
else if(choice==2){
Cout<<"chocolate"<<endl;
}
else{
Cout<<"you entered wrong choice"<<endl;
}
0
I more recommend you use switch case. Better performance.
0
yeah I know dear but I can make with the help of if statement please help me ..... @shaufyqsone
0
Okay thanks dear I was created program yesterday in c# with myself ;) but thanks you so much you help me . @shaufyqsone
0
Okay thanks dear I was created program yesterday in c# with myself ;) but thanks you so much you help me . @shaufyqsone
0
Welcome, I'm too still in learning. đ
0
hahahahahaha......... @shaufyqsone