[ create a new paste ] login | about

Link: http://codepad.org/cPUkzjv1    [ raw code | output | fork ]

C, pasted on May 19:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
 
int main() {
 
    /**
     * Escreva a sua solução aqui
     * Code your solution here
     * Escriba su solución aquí
     */
 int a, b, x;
    printf("valor 1:");
    scanf("%d",$a);
    printf("valor 2:");
    scanf("%d",$b);
    x = a + b
    printf("Resultado: %d",x);
    return 0;
}


Output:
1
2
3
4
5
6
In function 'main':
Line 12: error: '$a' undeclared (first use in this function)
Line 12: error: (Each undeclared identifier is reported only once
Line 12: error: for each function it appears in.)
Line 14: error: '$b' undeclared (first use in this function)
Line 16: error: expected ';' before 'printf'


Create a new paste based on this one


Comments: