jituTechnology

jituTechnology

Write a C program to read 10 numbers in an array and print in reverse order

//program to read 10 numbers in an array and print in reverse order. #include <stdio.h> #include <conio.h> void main () { int i,j; int a[10]; printf (“Enter 10 number\n”); for (i=0;i<10;i++) { scanf(“%d”,&a[i]); } printf(“The reverse is:\n”); for (j=9;j>=0;j–) printf (“%d\t”,a[j]); getch(); }

read more

Write a C program to read through an array of any type. Write a C program to scan through this array to find a particular value.

/*program to scan through this array to find a particular value programmed by: Name: Jitendra Kumar Yadav Roll: 10116 Date: 29 march 2011 */ #include <stdio.h> #include <conio.h> void main () { int i,n,index; int a[] = {1,2,3,4,5,6,7,8}; printf (“Enter a number from 1 to 8\n”); scanf (“%d”,&n); for (i=0;i<8;i++) { if (n==a[i]) index = […]

read more

Write a program to read N number of person’s ages in an array and print minimum,maximum and average age

/*program to read N number of person’s ages in an array and print minimum,maximum and average. programmed by: Name: JItendra Kumar Yadav Roll: 10116 Dtae 29 th march 2011 */ #include <stdio.h> #include <conio.h> void main () { int i,j,n; int sum=0; int max,min; float avg; int age[100]; printf(“Enter the number of people “); scanf […]

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

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