fork download
  1. #include<iostream>
  2. #include<string>
  3. using namespace std;
  4. /* y=m*x+c; */
  5.  
  6. int main()
  7. {
  8. int x,y,m,c;
  9. cout<<"Enter value of X-coordinate ";
  10. cin>>x;
  11. cout<<"Enter Slope "<<endl;
  12. cin>>m;
  13. c=o;
  14. y=m*x+c;
  15.  
  16. cout<<"Y coordinate is "<<y;
  17. return 0;
  18.  
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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)
stdout
Standard output is empty