Professional Documents
Culture Documents
1> write a c program to take inputs from the user and add
those two numbers.
~ C code:
~ Output:
~ Explanation:
2> write a c program to take inputs from the user and
subtract those four numbers.
~ C code:
~ Output:
~ Explanation:
3> write a c program to take one input from the user and
Divide that number by zero.
~ C code:
~ Output:
~ Explanation:
4> write a c program to take inputs from the user and
multiply those four numbers.
~ C code:
~Output:
~ Explanation:
5> write a c program to solve the given equation: a+a-
b*c/d*e.
a=10,b=15,c=15,d=20,e=30
~ C code:
~ Output:
~ Explanation:
6> write a c program for company profit, take the company's
revenue and profit in percentages from the user.
~ C code:
~ Output:
~ Explanation:
7> write a c program that prints even numbers using a FOR
loop, ranging from 31 to 81.
~ C code:
~ Output:
~ Explanation:
Hint:
An equilateral triangle is one in which all three sides are the same
length.
~ C code:
~ Output-1:
~ Output-2:
~ Output-3:
~ C code:
~ Output-1:
~ Output-2:
~ Explanation for output-1:
~ C code:
~ Output:
~ Explanation:
12> Write a c program to print a Multiplication table using
FOR loop.
~ C code:
~ Output:
~ Explanation:
13> Write a c program to print the descent order among the
three values.
~ C code:
~ Output-1:
~ Output-2:
~ Output-3:
~ C code:
~ Output-1:
~ Output-2:
~ Output-3:
~ Output-4:
~ Output: