Skip to main content

Posts

Showing posts from March, 2019
Basic C project 1 for First year students. Tic Tac  Tic    toe game(code) #include<stdio.h> #include<windows.h> #include<stdlib.h> #include<conio.h> struct myDataType{     int i;     char ch; }inputValue(); void run(); int check(char sym[9],char ch,int count); struct myDataType inputValue(char sym[9],int count); void Display(char sym[9]); void main(){     char reStart;     again: run(); printf("\nIf You Want To Play Again Press 1: \nElse Any:"); scanf("%s",&reStart); if(reStart == '1')         {             system("cls");             goto again;         }     else         exit(0); } void run(){     int count = 0;     struct myDataType info;     char symbol[9] = {'1','2','3','4','5','6','7','8','9'};     Display(symbol);     again:     info = inputValue(symbol,count);     symbol[info.i] = info.ch;     sys