Why does it pain you? And what does more "portable options" mean? I'm new to programing but I want to be a good programmer.
Type: Posts; User: djz3r0
Why does it pain you? And what does more "portable options" mean? I'm new to programing but I want to be a good programmer.
Is there any way of doing that? How about in C++ if C can't handle it.
the fflush thing is to pause the program while using Visual C++ to compile the program, I just took this out because I switched to command line mode instead. About the scanf I will add an if...
I'm trying to display a result on the same line as the user inputs the data. How do I do this? Everytime I try to do this, it displays on the next line.
Example:
I get this:
Input Code ...
Ignore the \r in the printf...I was tried \b and \r and neither helped.
//Lab assignment 1b-b
//produces a validation letter for a 10 digit #
#include <stdio.h>
#include <conio.h>
void main(void)
{
int pair1, pair2, pair3, pair4, pair5, total, vchar;
good old fashoned c code:
#include <stdio.h>
void main(void)
{
char char1,char2,char3,cahr4;
scanf("%c%c%c%c",char1,char2,char3,char4);
printf("%c%c%c%c",char4,char3,char2,char1);
I am making a program that takes a 10 digit number, and using a process makes a verification #. But I would like to display the output on the same line as the input. Any help is appreciated, C code...