# how to create a back loop??

by memenk

• 0
• 0
• 0
293 views
`// AreaPerimeter.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "stdio.h"#include "conio.h"int x;int y;float Radius;float Side;float Base;float Height;float Area;float Perimeter;float Circumference;float Hypotenuse;int _tmain(int argc, _TCHAR* argv[]){    printf("MENU;\n");printf("1.Area\n");printf("2.Perimeter\n");printf("Enter your choice:");scanf("%d",&x);if(x==1){    printf("1.Circle\n");printf("2.Square\n");printf("3.Triangle\n");printf("Enter your choice\n");scanf("%d",&x);if(x==1){printf("Enter the Radius:");scanf("%f",&Radius);Area=3.14159*(Radius*Radius);    printf("The Area is:%f",Area);}else if(x==2){printf("Enter the Side:");scanf("%f:",&Side);Area=Side*Side;printf("The Area is:%f",Area);}else if(x==3){printf("Enter the Base:\n");scanf("%f",&Base);printf("Enter the Height:\n");scanf("%f",&Height);Area=.5*Height*Base;printf("The Area is:%f",Area);}}else if(x==2)    {printf("1.Circle\n");printf("2.Square\n");printf("3.Triangle\n");printf("Enter your choice:");scanf("%d",&x);if(x==1){printf("Enter the Radius:");scanf("%f",&Radius);Circumference=Radius*3.1416;    printf("The Circumference is:%f",Circumference);}else if(x==2){printf("Enter the Side:");scanf("%f:",&Side);Perimeter=4*Side;printf("The Perimeter is:%f",Perimeter);}else if(x==3){printf("Enter the Base:\n");scanf("%f",&Base);printf("Enter the Height:\n");scanf("%f",&Height);printf("Enter The Hypotenuse:");scanf("%f[-",&Hypotenuse);Perimeter=Hypotenuse+Height+Base;printf("The Perimeter is:%f",Perimeter);}}getch();    return 0;}`