plss can anybody help me about this one.

i dont know how end it and go back from the start using Y/N switch case im beginners. i dnt have any idea how to start . I DID THIS EXAMPLE BUT ITS ALL INCORRECT JUST TO SHOW U WHAT IM TRYING TO SAY.
#include<iostream.h>
#include<graphics.h>
#include<conio.h>
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include< math.h>

define p printf
define s scanf
define g gotoxy



void main ()


int color, i,n,,gd=DETECT, gm;A,B,C,D;str, strreverse, name y,n;
int length = 0;
int 1, 2,3,4,5,6;
char[100]
clrscr ();

g(25,4) p(" PROJEct");

p(" choose program: ");
s("%C"&,y,n);

P("#2 REVERSE PROGRAM");
P("#3 Fibonacci program);
P("4 Deffirent Shapes");
P("A Circle")
p("B rectangle");
p("C Square");
P("D ellipse");
P(#5 Create your Own program")

do {

REverse



printf("enter your name: ");
scanf("%[^\n]", name);

//determine the length of the string
while(name[length] != '\0')
length ++;

while(length >= 0){
printf("%c", name[length]);
length --;

break;


p( "try again y/n");
S("%c",& y,n);
}

//fibonacci
switch ( )


int a[10],i,n;
printf("enter howm any elements");
scanf("%d",&n);

for(i=0;i<=n;i++)
scanf("%d",&a[i]);

for(i=n;i>=0;i--)
printf("%d",a[i]);

}

shapes
{
switch (1)
case 'A'

initgraph(&gd,&gm,".. ");
circle(100,100,50)
outtextxy(75,170, "Circle")
putpixel(100,100,WHITE);

break;

p (try again y/n )


CASE B


rectangle(200,50,350,150);
outtextxy(240, 170, "Rectangle");
}


You use a loop to repeat something.
http://www.cplusplus.com/doc/tutorial/control/
Topic archived. No new replies allowed.