C Project – Tic Tac Toe Game
Program 1 #include <stdio.h> #include<conio.h> char board[3][3] = { {‘ ‘, ‘ ‘, ‘ ‘}, {‘ ‘, ‘ ‘, ‘ ‘}, {‘ ‘, ‘ ‘, ‘ ‘} }; void printBoard() { printf(“————-\n”); for (int...
Program 1 #include <stdio.h> #include<conio.h> char board[3][3] = { {‘ ‘, ‘ ‘, ‘ ‘}, {‘ ‘, ‘ ‘, ‘ ‘}, {‘ ‘, ‘ ‘, ‘ ‘} }; void printBoard() { printf(“————-\n”); for (int...
Program 1 #include <stdio.h> #include<conio.h> // 2 D Array char board[3][3] = { {‘ ‘, ‘ ‘, ‘ ‘}, {‘ ‘, ‘ ‘, ‘ ‘}, {‘ ‘, ‘ ‘, ‘ ‘} }; void printBoard()...
Program 1 // Simple calculator #include<stdio.h> #include<conio.h> #define clrscr() system(“cls”) int main() { char operator1; double num1,num2,num3; clrscr(); printf(“Enter First Number: “); scanf(“%lf”,&num1); printf(“Enter Second Number: “); scanf(“%lf”,&num1); printf(“Enter Operator (+ , – ,...
Program 1 // Rock , Paper , Scissors Game #include<stdio.h> #include<conio.h> #include<time.h> #define clrscr() system(“cls”) int main() { clrscr(); int userchoice,compchoice; srand(time(0)); compchoice=rand()%3+1; printf(“\n ————Rock , Paper , Scissors Game———–“); printf(“\n 1 . Rock”);...
Program 1 // Project for Guess randmom number #include<stdio.h> #include<conio.h> #include<time.h> #define clrscr() system(“cls”) int main() { clrscr(); int me,you,i=1,count=10; srand(time(NULL)); me=rand()%100; while(i<=10) { printf(“\n Enter a number : %d chance left”,count); scanf(“%d”,&you); if(me==you)...
Program 1 #include<stdio.h> #include<conio.h> #define clrscr() system(“cls”) int main() { clrscr(); char ch1,ch2,ch3,ch4; static int i=0; pin: printf(“\nEnter pin(only 4 digit): “); ch1=getch(); printf(“*”); ch2=getch(); printf(“*”); ch3=getch(); printf(“*”); ch4=getch(); printf(“*”); if(ch1==’1′ && ch2==’2′ &&...
Program 1 #include<stdio.h> #include<conio.h> #include<time.h> #define clrscr() system(“cls”) int main() { clrscr(); int userchoice,coinchoice; srand(time(0)); printf(“\n Welcome in the coin toss Game ! \n”); printf(“\n————————————-“); printf(“\nChoose 1. Head \nChoose 2. Tail \n “); printf(“\n————————————–“);...
Program 1 #include<stdio.h> #include<conio.h> #include<time.h> #define clrscr() system(“cls”) int main() { clrscr(); int n,l,u; // srand(time(NULL)); printf(“Enter value of Lower Bound: “); scanf(“%d”,&l); printf(“Enter value of Upper Bound: “); scanf(“%d”,&u); n=(rand()%(u+l+1))+l; printf(“%5d”,n); // int...
Program 1 // Fibbonacci Series using recursion // 0 1 1 2 3 5 8 13 24 ….. n #include<stdio.h> #include<conio.h> void fibbonacci(int); int main() { system(“cls”); int n; printf(“Enter a number”); scanf(“%d”,&n); fibbonacci(n);...
Program 1 #include<stdio.h> #include<conio.h> #include<string.h> int main(int argc,char *argv[]) { // printf(“\nTotal Arguements: %d”,argc); // printf(“\n1 Arguement: %s”,argv[0]); // printf(“\n2 Arguement: %s”,argv[1]); // printf(“\n3 Arguement: %s”,argv[2]); system(“cls”); if(argc!=2) printf(“Required 2 Argument only: “) ;...