hello! im trying to make a program where entered values should be displayed in a tabulated form. however, as far as i know, everytime we enter a value and press ENTER, the cursor goes to the next line. is there any way where in if a user enters a value and press ENTER, the cursor will go to the next tab only and not to the next line?


i hope you understand my problem. thank you btw.

a \t makes it move horizontally

can i have the proper coding for it? because when i add \t in cin,, there is an error.

thanx for the reply

cin attempts to read an integer from standard input. It waits until the user presses <Enter> and then attempts to convert the values entered and stores them into your variables.

You can read multiple values at a time, by storing them in different variables. ie

cin >> accountno >> amount ;

I don't know a way by which an <Enter> will not take you to the next line.

thanx for the reply!! ill try if it will work. :)