4.9 Write a program to perform addition of two numbers.
# include <stdlo.h>
# include <conio.h>
mainO
{
int a,b,c;
printf (“\n ENTER TWO VALUES\n");
scanf (“\n %d %d ", &a, &b);
cxa+b;
printf ("\tt Sum is~%d",c);
}
OUTFUJ;
ENTER TWO VALUES 58
SUM IS = 13
ExplanationIn the above program variables a, b & c are declared. Values of a and b are read
through the keyboard using scanf () statement. Addition of variables a and b is performed and
assigned to variable c.
4.9 Write a program to find the square of the given number.
# include<stdio.h>
# include <conio.h>
main()
{
in t a ,c;
printf ("\n EN ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.