View Code of Problem 1

#include<stdio.h>

using namespace std;
int main() {
	int a, b;
	cin >> a >> b;
	cout << a + b;
	return 0;
}

/*
Main.c:3:1: error: unknown type name 'using'
 using namespace std;
 ^
Main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
 using namespace std;
                 ^
Main.c: In function 'main':
Main.c:6:2: error: 'cin' undeclared (first use in this function)
  cin >> a >> b;
  ^
Main.c:6:2: note: each undeclared identifier is reported only once for each function it appears in
Main.c:7:2: error: 'cout' undeclared (first use in this function)
  cout << a + b;
  ^
*/

Double click to view unformatted code.


Back to problem 1