CDS Mid Sem Assignment
CDS Mid Sem Assignment
#include<stdio.h>
void main()
{
int i,j;
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++)
}
}
Exercise
1. WAP to input the 3 sides of a triangle & print its corresponding type.
2. WAP to input the name of salesman & total sales made by him. Calculate &
print the commission earned.
TOTAL SALES RATE OF COMMISSION
1-1000 3%
1001-4000 8%
6001-6000 12 %
6001 and above 15 %
3. WAP to print the following series
i. S = 1 + 1/2 + 1/3 ……..1/10
ii. P= (1*2) + (2 *3) + (3* 4)+…….(8 *9) +(9 *10)
iii. S = x + x2 + x3 + x4......+ x9 + x10
iv. S = 1/1! + 1/2! + 1/3! ……………+1/n!
v. S = 1 + x + x2/2 + x3/3…….+xn/n
4. Write a C program to print Fibonacci series up to n terms.
5. Write a C program to find frequency of each digit in a given integer.