when i run it its all wrong but why?? i`m new in this so can you help?
#include<iostream.h>
main()
{
int i,y,rc=0,ec=0,ac=0,n=0;
char choice;
char x;
cout<<"please enter your choice\n";
cout<<"press a or A to count characters\npress b or B to sinx and series\npress c or C to count perfects,digits and prime number\npress d or D to Binary and Decimal\npress d or D to exit\n";
cin>>choice;
if(choice=='a'||choice=='A')
cout<<"press 1 to count characters\npress 2 to change text number to integer\npress 3 to change from capital to small\npress 4 to return to the main menu\n";
cin>>choice;
if(choice=='1')
{
cout<<"enter your text\n";
for(;x!='q';)/>
{
cin>>x;
if(x=='a')
ac=ac+1;
else
if(x=='r')
rc=rc+1;
else
if(x=='e')
ec=ec+1;
cout<<"a="<<ac<<"r="<<rc<<"e="<<ec;
break;
}
}
if(choice=='2')
{
cout<<"enter your text number\n";
for(;y!='q';)/>
cin>>y;
if(y>=48&&y<=57)
n=n*10+(y-48);
cout<<"the int is\n"<<n;
}
}
This post has been edited by macosxnerd101: 01 December 2010 - 11:02 AM
Reason for edit:: Please use code tags

New Topic/Question
Reply
MultiQuote













|