Posts

Showing posts with the label GAME parking management system

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...

print Matrix in C language with using macro , source code in C language (Program 14).

/*MADE BY ANMOL MAIN STUDENT - B.TECH CSE  PUNJABI UNIVERSITY HINDUSTAN CODING Program 14 */ #include   <stdio.h> #define  M  3 #define  N  3 int   main () {      int  i, j, a;      int   arr [M][N];      for  (i =  0 ; i < M; i++)     {          for  (j =  0 ; j < N; j++)         {              printf ( "ENTER THE A %d %d ELEMENT : " , i +  1 , j +  1 );              scanf ( "%d"  &  arr [i][j]);         }  ...

Source code for Square shaped Star pattern in C language with user defined rows and colums. (Program 12)

/* Made by Anmol main  student B.tech CSE  Punjabi university  Program 12 */ #include<stdio.h> int main()  {   int i,j,num1,num2;     int a,b; //this is used to quit the program if user input character in place of integer     printf("Enter number of rows : ");     scanf("%d",&num1);     if (num1<0)         printf("\nPlease enter valid integer\n");     if (num1>0) {         printf("Enter number of colums : ");         scanf("%d",&num2);         if (num2<0)             printf("\nPlease enter valid integer\n");         else {             for(i=1; i<=num1; i++)             {                 for(j=1; j<=num2; j++)               ...

Guess the number game in C with source code | hindustan coding (Program 11)

/* Made by Anmol main  student B.tech CSE  Punjabi university Program 11  */ #include<stdio.h> #include<time.h> #include<stdlib.h> int main() {   int number;     int a;     int c=1;     printf("🌱🍯🌱🌱🍯🌱🐝🌱\n🌱🍯🌱🌱🍯🌱🌱🌱\n🌱🍯🍯🍯🍯🌱🍯🌱\n🌱🍯🌱🌱🍯🌱🍯🌱\n🌱🍯🌱🌱🍯🌱🍯🌱\n🌼🌱 HELLOWW!! 🌱🌼\n\n");     //char name;     srand(time(NULL));     number = rand()%10+1;     //  printf("the number is %d",number);     do     {       //  printf("Enter your first name\n");        // scanf("%s",&name);                  printf("\nEnter Your Number πŸ”’\n");         scanf("%d",&a);         //sleep(1);         if(a>number)             printf("🚬🚬🚫🚫🚫🚫🚬🚬\n🚬🚫🚫🚬🚬🚬🚫🚬\n?...

Stone paper secissor game in C | Source code (Program 10)

/*Basic Stone paper secissor game Made by Anmol main 1417 Student - B.tech CSE,   Punjabi university Program 10 */ #include<stdio.h> #include<time.h> #include<stdlib.h> int main() {   int number;     int a;     int b;     int c;     int u;     int p;     int m;     int play;     srand(time(NULL));     // printf("the number is %d",number);     /*   printf("!!\n\nare You Ready to play!\n");        printf("press any key to play\n");        scanf("%d",&a);        //if (a==0)        printf("\nlets get started\n");*/ end: play:     printf("Enter your choice\nPress 1 for Stone🏦\nPress 2 For paperπŸ“„\nPress 3 for secissor✂️\n\n");     scanf("%d",&c);     if (c>3)         printf("πŸ˜’πŸ˜’Enter number only 1-2-3πŸ˜’πŸ˜’\n\n");   ...

Program to find Days in a week by entering a number using switch statement in C language (Program 09)

 /*Made by Anmol main Student B.tech CSE Punjabi university Hindustan Coding Program 09 */ #include<stdio.h> int main() {   int a; //write the fixed values of a and b if not then take it from the user     printf("Enter number of day\n");     scanf("%d",&a);     if (a>7||a==0)         printf("There are only 7 days in a week\nso please enter 1 to 7 digit\n");     else {         switch (a)         {         case 1:             printf("MONDAY");             break;         case 2:             printf("TUESDAY");             break;         case 3:             printf("WEDNESDAY");             break;         case 4...