#include
using namespace std;
int main()
{
int Choice1=0;
char indicator='y';
int Ans=0;
if(indicator=='y')
{
cout<<"Please Enter a number from 1 to 10: "; cin>>Choice1;
cout<
}
if(Choice1==1)
{
for(Choice1=1; Ans++;)
Ans+=Choice1;
cout<
cout<<"You've Enter One, "<
cout<
cout<
cout<<"Do you want to enter another value?";
cout<<"Enter y for yes, (n to end): "; cin>>indicator;
cout<
cout<
int Choice1=0;
}
if(Choice1==2)
{
for(Choice1=2; Ans++;)
Ans+=Choice1;
cout<
cout<<"You've Enter One, "<
cout<
cout<
cout<<"Do you want to enter another value?";
cout<<"Enter y for yes, (n to end): "; cin>>indicator;
cout<
cout<
}
cout<
cout<<"Okay Bye\n\n";
return 0;
}
2007-01-25
21:14:53
·
4 answers
·
asked by
capphire
2
in
Computers & Internet
➔ Programming & Design
I'm trying to code out enter 1 to 10 if the user enter 4, programs reply "You entered 4" using "for" and "if"
2007-01-25
21:27:32 ·
update #1
To: Rawlyn, Dont REPLY RUBBISH. If i know i wouldn't be asking!
2007-01-25
21:28:55 ·
update #2