C Online Compiler
Example: Sum of Two Numbers in C Program
C
C++
C#
Java
Python
PHP
main.c
STDIN
Run
// Sum of Two Numbers in C Program #include <stdio.h> int main() { int p, q, r; printf("Enter two integer values::\n\n"); scanf("%d %d", &p, &q); // calculating sum r = p + q; printf("Result:: %d + %d = %d\n", p, q, r); return 0; }
5 7
Output
Clear
ADVERTISEMENTS