Programmed by : kiran shrestha Roll no. : 10121 Programmed on : 7th feb, 2011*/ #include <stdio.h> #include <conio.h> void main () { int i,j,a=0; for (j=1;j<=5;j++) { for (i=1;i<=5;i++) { if(j==i) printf (“%d\t”,a); else printf (“%d\t”,j); } […]
Programmed by : kiran shrestha Roll no. : 10121 Programmed on : 7th feb, 2011*/ #include <stdio.h> #include <conio.h> void main () { int i,j,a=0; for (j=1;j<=5;j++) { for (i=1;i<=5;i++) { if(j==i) printf (“%d\t”,a); else printf (“%d\t”,j); } […]
/*program to print numbers in the following using loops. Programmed by : kiran shrestha Roll no. : 10121 Programmed on : 7th feb, 2011*/ #include <stdio.h> #include <conio.h> void main () { int i,j; for (i=1;i<=5;i++) { for (j=1;j<=i;j++) { printf (“%d\t”,i); } […]
/*program to print numbers in the following using loops. Programmed by : kiran shrestha Roll no. : 10121 Programmed on : 7th feb, 2011*/ #include <stdio.h> #include <conio.h> void main () { int i,j; for (i=1;i<=5;i++) { for (j=1;j<=i;j++) { if(j%i!=0) printf (“%d\t”,0); […]
/*program to print numbers in the following format using loops. Programmed by : kiran shrestha Roll no. : 10121 Programmed on : 7th feb, 2011*/ #include <stdio.h> #include <conio.h> main () { int i,j; int a=1; for (i=1;i<=5;i++) { for (j=a;j<=a+2;j++) { printf (“%d\t”,j); […]
Write a program to calculate the sum of cosine series Programmed by : kiran shrestha roll no. : 10121 Programmed on : 6th feb,2011*/ #include <stdio.h> #include <conio.h> #include <math.h> void main () { int i,j,n; float sum=0,fact=1,x; printf (“enter terms = “); scanf (“%d”,&n); printf (“enter the angle of […]