i am a new learner of C++ n just study it based on book n practising.....
I try to do something but it didn't do what I want.... What is the problem in my source code.....
My planning is.... when we enter letter 'Y' the program will continuing...
when I enter 'N', the program will go to starting (mula)
when I put enter others.....It will asked the question to input Y and N again.....
*******************************************************************************
#include <stdio.h>
void main()
{
//declaration
int nmin, agree, Y, y, N, n;
float CA, CA1, CA2, CB;
Y=y=1;
N=n=0;
//introduction about the program
printf("WELCOME TO WEEZ STUDIO CREATIVE WORLD.\nThis program will analyze two different rate plans for cellular phone access.");
printf("To start,enter the number of minutes that you plans on using in a month\n\n");
//starting of 7525164
mula:
printf("Enter number of minutes you plan to use each month:\n");
scanf("%d",&nmin);
printf("\n\nYou entered %d minutes\n",nmin);
//selection part
yesno:
printf("Enter Y to continue or N to change the number of minute.");
scanf("%s",&agree);
//selection controll
if(agree==1)
goto continued;
else if(agree==0)
goto mula;
else goto yesno;
//continuing the program... if answer yes
continued: