Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
#include <stdio.h>
#include <ctype.h>
void main()
{
float length, width;
char choice;
do
{
printf("Enter length: ");
scanf("%f", &length);
printf("Enter width: ");
scanf("%f", &width);
printf("Perimeter = %f", (2*length) + (2*width));
printf("\nWould you like to try again? [y/n]: ");
scanf(" %c", &choice);
choice = toupper(choice);
}while (choice== 'Y');