[ create a new paste ] login | about

Link: http://codepad.org/D9JIIQW2    [ raw code | output | fork ]

C, pasted on Aug 13:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
int main (void)
{
  float length,width;

printf("Enter the length of the rectangle;\n");
while (scanf("%f",&length)==1)
{
      printf("length = %0.2f;\n",length);
      printf("enter its width;\n");
      if (scanf("%f,&width)!= 1")
          break;
      printf("width = %0.2f;\n",width);
      printf("Area = %0.2f;\n",length * width);
      printf("Enter the length of the rectangle;\n");
    }
      printf("done.\n");
      return 0;
}


Output:
1
2
3
In function 'main':
Line 12: error: expected ')' before 'break'
Line 16: error: expected expression before '}' token


Create a new paste based on this one


Comments: