Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

no user input return

Status
Not open for further replies.

liglin

Programmer
Jun 21, 2001
5
US
In MS VC++ 6.0 under Win 2000 the input 5 produces this output:
&d yd =

What may be missing?

Thanks, Liglin



#include <stdio.h>

void main()
{
int yard;
printf(&quot;Enter next length: &quot;);
scanf(&quot;%d&quot;, &yard);

printf(&quot;\n&d yd = \n&quot;, yard);
}
 
It prints exactly what you told it to.

I suspect you wanted to use something more like the format string &quot;\n%d\n&quot; in printf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top