Posts

Showing posts with the label coding

C Pogram to play Sa-re-ga......sa wihout break (Program 25)

/* Made by Anmol main Student :B.tech CSE  Punjabi university Patiala Program No. : 25 */ #include   <stdio.h> #include   <conio.h> #include   <windows.h> int   main () {      int   a ;      int   b   =   240 ;      printf ( "Press 1 to play Only 1 time \n: " );      printf ( "Press 2 to play untill you press a button \n: " );      scanf ( "%d" ,  & a );      switch  ( a )     case  1 :     {          do         {              Beep ( b ,  1000 );    ...

C program to find the sum of 2 matrices ( Program 24)

/* Made by Anmol main Student :B.tech CSE  Punjabi university Patiala Program No. : 24 */ #include   <stdio.h> #define   m   5 #define   n   5 int   main () {      int   i ,  j ,  k ;      int   arows ,  acolums ,  brows ,  bcolums ,  sum   =   0 ;      int   a [ m ][ n ];      int   b [ m ][ n ];      int   p [ m ][ n ];      //getting input of two matrices from the user      printf ( "\nEnter the number of rows : " );      scanf ( "%d" ,  & arows );      printf ( "Enter the number of colums : " );      scanf ( "%d" ,  & acol...

C program to print product of 2 matrices (Program 23)

/* Made by Anmol main Student :B.tech CSE  Punjabi university Patiala Program No. : 23 */ //number of rows of 1 matrix and number of colums of 2 matrix #include   <stdio.h> #define   n   3 int   main () {      int   i ,  j ,  k   =   0 ;      int   sum   =   0 ;      int   rows ,  colums ;      int   brows ,  bcolums ;      int   product [ n ][ n ];      int   text [ n ][ n ];      int   text2 [ n ][ n ];      printf ( "Enter number of rows of matrix A: " );      scanf ( "%d" ,  & rows );      printf ( "Enter number of c...

C program to input a matrix (program 21)

/* Made by Anmol main Student :B.tech CSE  Punjabi university Patiala Program No.  : 21 */ #include   <stdio.h> #define   n   3 int   main () {      int   i ,  j ;      int   text [ n ][ n ];      for  ( i   =   0 ;  i   <   n ;  i ++ )     {          for  ( j   =   0 ;  j   <   n ;  j ++ )         {              printf ( "A %d%d : " ,  i   +   1 ,  j   +   1 );              scanf ( "%d" ,  & text [ i ][ j ]);         }     }  ...

C program to print lengh of an array (program 20)

/* Made by Anmol main Student :B.tech CSE  Punjabi university Patiala Program No.:20 */ #include   <stdio.h> int   arr []   =  { 3 ,  2 ,  6 ,  5 ,  9 ,  4 ,  9 ,  7 ,  2 ,  6 ,  4 ,  7 ,  1 ,  3 ,  2 ,  5 ,  9 ,  8 }; int   main () {      int   i ,  j ;      int   s ,  p ,  q ;     //Logic : sizeof(name of array)/sizeof(name of array[0])      s   =   sizeof ( arr );      p   =   sizeof ( arr [ 0 ]);      q   =   s   /   p ;      printf ( "\nThere are total %d elements are there in array.\n" ,  q );      return 0; }

C language code to print "MAHADEV " text with letter by letter animiation source code .(Program 19)

/*Made by Anmol main Student: B.tech CSE Punjabi university patiala*/   #include   <stdio.h> #include <dos.h> #include <windows.h> char   text []   =   "                                                                                                                                ...

Recipie book in c language with text animiations - Source code ( Program - 18 )

 /*Made by Anmol main Student - B.tech  CSE Punjabi university*/ #include <stdio.h> #include <conio.h> #include <dos.h> #include<windows.h> int i, j; char text[] = "| MAIN MENU:          |\n|_____________________|\n|_____________________|\n| achari mutton       |\n| bhatura             |\n| black dal           |\n| black eyes beans    |\n| corn pakoda         |\n|"; char text1[] = "\n=> Wash and cut the mutton into 11/2 cubes.\n=> Take off and cut the onions.\n=> Cut the tomatoes.\n=> Roast the whole spices separately and grind everything coarsely.\n=> Heat up oil in a thick-bottomed pot to smoking point, cool and again heat up the oil and stir fry the onions till brown. Preparation Time Serves 45 minutes 6 Punjabi Recipes 5\n=> Mix in the cut ginger-garlic.\n=> Mix well.\n=> Mix in coar...

Election management system source code in C language (program 17)

/*Made by Anmol main Student - b.tech CSE Punjabi university */ #include <stdio.h> #include<windows.h> #include<stdlib.h> int p1(); int p2(); int p3(); int p4(); int p5(); int p6(); int p7(); int p8(); int p9(); int p10(); int a, b, c, d, e, j, ii,jj,f,g,h,num,ps, count; int i = 0; int main() { big:     printf("_______________________________________________________");     printf ("\nBEFORE SETTTING THE NAMES OF PARTIES \nPLEASE COFIRM THAT YOU ARE ADMIN\n\nENTER ADMIN KEY NUMBER\n");     printf("_______________________________________________________\n");     scanf("%d",&ps);     printf("_______________________________________________________\n");     if (ps==1212)     {         system("CLS");         printf("\nADMIN CONFIRMED\n");         printf("number of parties : ");         scanf("%d", &num);     ...

star pattern to print right angled triangle in C language with user defined row and colums | (star pattern code 2) | (Program 16)

  /* Made by Anmol main student B.tech CSE Punjabi university Program 16 */ #include<stdio.h> int main() {int i,j,a,b;     printf("Enter the number of rows\n");     scanf("%d",&a);     printf("Enter the number of colums\n");     scanf("%d",&b);     for(i=0;i<a;i++)     { printf("\n");         for (j=0;j<b;j++)         {             if (i>=j)             {printf("* "); }             else             printf(" ");         }     } }

Hand cricket Game in C language - source code ( Program 15)

/* Made by Anmol main student B.tech CSE  Punjabi university   Program 15 */ #include <stdio.h> #include <windows.h> #include <conio.h> #include <stdlib.h> #include <time.h> #include <dos.h> #define N 20 int main() {     {          }     int x;     double y;     printf("_______________________________________");     char text1[] = "| WELCOME TO HAND CRICKET GAME         |";     char text2[] = "| MADE BY ANMOL MAIN                   |";     char text3[] = "| LETS GET STARTED                     |\n|______________________________________|\n";     char text4[] = "\nENTER PLAYER 1 NAME : ";       char str[N];     char str2[N];     char text6[] = "\n\nRULES OF THE GAME -:\nTwo...