I am writing this program as an assignment but I don't know what is wrong. I have to use gets() and getchar() to take the users name and 2 (x,y) and print on the screen each number between the values of of x and y. This is what I have so far but it has several errors.
#include <stdio.h>
void main(void)
{
/*Declare Variables*/
int x,y;
char name [50];
/*Get users name*/
name=getchar();
/*Get values for x and y from user*/
x=gets(int);
y=gets(int);
/*Loop through numbers and print*/
while (x<=y)
printf("\t",x);
++x:
getchar(): /*wait for key stroke to exit*/
}



LinkBack URL
About LinkBacks



)