All pastes #135631 Raw Edit

Untitled

public c v1 · immutable
#135631 ·published 2006-08-17 02:52 UTC
rendered paste body
#include <stdio.h>#include <string.h>#include <stdlib.h>char letter;char word[20];int wordlength;char checkedword[20];int checkguess(void){         int x;     for(x=0;x<wordlength;x++)     {         if(letter==word[x])           {                            checkedword[x] = word[x];                                     printf("Correct! %c was in the word\n",letter);           }     }}int show(void){                    printf("%s",checkedword);}int show(void);int main(void){    printf("Word for 2nd person to guess: ");    scanf("%s",&word);    system("cls");    wordlength = strlen(word);    printf("Start guessing!\n\n\n\n");    fflush(stdin);    letter = getchar();    checkguess();    show();    return 0;}