fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. // Declare variables
  5. int room1length, room1width, room2length, room2width, room3length, room3width, room4length, room4width, area1, area2, area3, area4, areatotal;
  6. printf(“Enter the lengths and widths of up to four rooms and get their respective and total areas. If there are less than four rooms enter 0 for the length and width for those rooms.”);
  7. printf(“Enter the length of room #1”);
  8. cin ≫ room1length;
  9. printf(“Enter the width of room #1”);
  10. cin ≫ room1width;
  11. printf(“Enter the length of room #2”);
  12. cin ≫ room2length;
  13. printf(“Enter the width of room #2”);
  14. cin ≫ room2width;
  15. printf(“Enter the length of room #3”);
  16. cin ≫ room3length;
  17. printf(“Enter the width of room #3”);
  18. cin ≫ room3width;
  19. printf(“Enter the length of room #4”);
  20. cin ≫ room4length;
  21. printf(“Enter the width of room #4”);
  22. cin ≫ room4width;
  23. area1 = room1length * room1width;
  24. area2 = room2length * room2width;
  25. area3 = room3length * room3width;
  26. area4 = room4length * room4width;
  27. areatotal = area1 + area2 + area3 + area4;
  28. printf(“The area for room 1, 2, 3, and 4 are as follows %d, %d, %d, %d\n :, area1, area2, area3, area4);
  29. printf(“The area of the rooms added together is %d\n :, areatotal);
  30. return 0;
  31. }
  32.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(2,0): error CS1024: Wrong preprocessor directive
prog.cs(2,0): error CS1525: Unexpected symbol `int'
prog.cs(6,8): error CS1056: Unexpected character `“'
prog.cs(6,184): error CS1056: Unexpected character `”'
prog.cs(7,8): error CS1056: Unexpected character `“'
prog.cs(7,34): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
prog.cs(7,36): error CS1056: Unexpected character `”'
prog.cs(8,5): error CS1056: Unexpected character `≫'
prog.cs(9,8): error CS1056: Unexpected character `“'
prog.cs(9,33): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
prog.cs(9,35): error CS1056: Unexpected character `”'
prog.cs(10,5): error CS1056: Unexpected character `≫'
prog.cs(11,8): error CS1056: Unexpected character `“'
prog.cs(11,34): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
prog.cs(11,36): error CS1056: Unexpected character `”'
prog.cs(12,5): error CS1056: Unexpected character `≫'
prog.cs(13,8): error CS1056: Unexpected character `“'
prog.cs(13,33): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
prog.cs(13,35): error CS1056: Unexpected character `”'
prog.cs(14,5): error CS1056: Unexpected character `≫'
prog.cs(15,8): error CS1056: Unexpected character `“'
prog.cs(15,34): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
prog.cs(15,36): error CS1056: Unexpected character `”'
prog.cs(16,5): error CS1056: Unexpected character `≫'
prog.cs(17,8): error CS1056: Unexpected character `“'
prog.cs(17,33): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
prog.cs(17,35): error CS1056: Unexpected character `”'
prog.cs(18,5): error CS1056: Unexpected character `≫'
prog.cs(19,8): error CS1056: Unexpected character `“'
prog.cs(19,34): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
prog.cs(19,36): error CS1056: Unexpected character `”'
prog.cs(20,5): error CS1056: Unexpected character `≫'
prog.cs(21,8): error CS1056: Unexpected character `“'
prog.cs(21,33): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
prog.cs(21,35): error CS1056: Unexpected character `”'
prog.cs(22,5): error CS1056: Unexpected character `≫'
prog.cs(28,8): error CS1056: Unexpected character `“'
prog.cs(28,75): error CS1056: Unexpected character `”'
prog.cs(29,8): error CS1056: Unexpected character `“'
prog.cs(29,55): error CS1056: Unexpected character `”'
Compilation failed: 40 error(s), 0 warnings
stdout
Standard output is empty