1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include<iostream> #include<string> using namespace std; /* y=m*x+c; */ int main() { int x,y,m,c; cout<<"Enter value of X-coordinate "; cin>>x; cout<<"Enter Slope "<<endl; cin>>m; c=o; y=m*x+c; cout<<"Y coordinate is "<<y; return 0; } |
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPHN0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKLyogICAgeT1tKngrYzsgICAgKi8KCmludCBtYWluKCkKewppbnQgeCx5LG0sYzsKY291dDw8IkVudGVyIHZhbHVlIG9mIFgtY29vcmRpbmF0ZSAgIjsKY2luPj54Owpjb3V0PDwiRW50ZXIgU2xvcGUgICI8PGVuZGw7CmNpbj4+bTsKYz1vOwp5PW0qeCtjOwoKY291dDw8IlkgY29vcmRpbmF0ZSBpcyAiPDx5OwpyZXR1cm4gMDsKCn0=
prog.c:1:19: error: iostream: No such file or directory prog.c:2:17: error: string: No such file or directory prog.c:3: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘namespace’ prog.c: In function ‘main’: prog.c:9: error: ‘cout’ undeclared (first use in this function) prog.c:9: error: (Each undeclared identifier is reported only once prog.c:9: error: for each function it appears in.) prog.c:10: error: ‘cin’ undeclared (first use in this function) prog.c:11: error: ‘endl’ undeclared (first use in this function) prog.c:13: error: ‘o’ undeclared (first use in this function)
-
result: Compilation error (maybe you wish to see an example for C99 strict)



