All pastes #677039 Raw Edit

Someone

public text v1 · immutable
#677039 ·published 2007-08-31 16:43 UTC
rendered paste body
#include <stdio.h>

int main (void)
{
	int nr1;
	int nr2;
	char [8] todo;
	int result;
	
	
	printf("nr1 pls\n");
	scanf("%d", &nr1);
	printf("nr2 pls\n");
	scanf("%d", &nr2);
	printf("What do u want to do? (add)\n");
	scanf("%s", &todo);
	
	if (todo == add)
	{
		result = nr1 + nr2;
		printf("%d\n", result);
	}
}



c: In function ‘main’:
c:7: error: expected identifier or ‘(’ before ‘[’ token
c:16: error: ‘todo’ undeclared (first use in this function)
c:16: error: (Each undeclared identifier is reported only once
c:16: error: for each function it appears in.)
c:18: error: ‘add’ undeclared (first use in this function)