jituTechnology

jituTechnology

C Programming

Write the program to print following patterns 1 using loops

/*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);         }            […]

read more

A program to find the largest of three number using function.

A program to find the largest of three number using function. Codes /*A program to find the largest of three number using function*/ /*Programed by          Jitendra Kr Yadav                         10116                         22 Mar,2011*/ #include<stdio.h> #include<conio.h> int larger(int,int,int); main() { int a, b, c; printf(“Enter the first number:”); scanf(“%d”,&a); printf(“Enter the second number:”); scanf(“%d”,&b); printf(“Enter the […]

read more

A program to calculate the factorial of a given number using recursive function.

A program to calculate the factorial of a given number using recursive function. Codes /*A program to find the factorial of a number using recursive function*/ /*Programed by          Jitendra Kr Yadav                          10116                          15 Mar,2011*/ #include<stdio.h> #include<conio.h> int rec(int); main() { int fact,n; printf(“Enter the number:”); scanf(“%d”,&n); fact=rec(n); printf(“Factorial = %d\n\n”,fact); printf(“Press […]

read more

Program to read 5*5 matrix and find sum of diagonal elements and to find sum of diagonal elements and all elements

/*Q.8.Program to read 5*5 matrix and find sum of diagonal elements and to find sum of diagonal elements and all elements Programmed by: Jitendra Kr Yadav Roll: 10116 Date: 2011/04/10*/ #include <stdio.h> #include <conio.h> void main() { int a[5][5]={{1,2,3,4,5},{6,4,2,7,9}, {4,9,4,2,7},{6,4,3,8,9},{4,5,4,3,7}}; int s=0; int i,j; int sum = 0; for(i=0;i<5;i++) {            for(j=0;j<5;j++)            […]

read more

Write the program to print following patterns 2

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);              } […]

read more


Connect with Me

GPO 8973 NPC 541; Kathmandu Nepal
Phone: +977 9851236800

Calendar

May 2024
S M T W T F S
 1234
567891011
12131415161718
19202122232425
262728293031