Click here to Skip to main content
15,886,049 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
S C:\Users\91962\Desktop\c c++> cd "c:\Users\91962\Desktop\c c++\" ; if ($?) { gcc 1.practisse.c -o 1.practisse } ; if ($?) { .\1.practisse }      
1.practisse.c: In function 'main':
1.practisse.c:5:5: error: expected identifier or '(' before 'int 

(these type of error they are showing please me

What I have tried:

C++
#include<stdio.h>
int main()
{
    int length = 3, breath  =8,
    
    int area = length*breath
    printf("the area of the rectangle is %d", area);
    return 0;
} 

i have tried these
Posted
Updated 17-Jun-21 6:50am
v2

1 solution

You are not terminating your code lines correctly:
C++
int length = 3, breath  =8,<-- the comma should be a semi-colon

int area = length*breath <-- the terminating semicolon is missing
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900