how can

Jul 1, 2010 at 1:17pm
how do get this output
1
2
3
4
5
6
7
8
9
10
in that
1 2 3 4 6 7 8 9 10

how to get multi line output in one line
Last edited on Jul 1, 2010 at 2:14pm
Jul 1, 2010 at 1:20pm
closed account (z05DSL3A)
*Scratches head* Must by Thursday, I never could get the hang of Thursdays.

Edit:
Try making your question a little bit more...erm... understandable.
Last edited on Jul 1, 2010 at 1:22pm
Jul 1, 2010 at 1:25pm
Has anyone really been far even as decided to go even want to do look more like?
Last edited on Jul 1, 2010 at 1:29pm
Jul 1, 2010 at 2:07pm
lol I assume he wants to output all the numbers on one line??
Jul 1, 2010 at 2:13pm
yes
Jul 1, 2010 at 2:18pm
closed account (y8h7M4Gy)
try using a string, there is a command that converts numbers to a string so look it up
Jul 1, 2010 at 2:24pm
Or just don't print newlines. That works, too.
Jul 1, 2010 at 3:13pm
 
std::cout << "1 2 3 4 6 7 8 9 10";


Did I miss anything?
Jul 1, 2010 at 3:33pm
Just for clarity, I think he means that he actually DOES want the output over multiple lines, just defined in a single line of code.
1
2
3
4
5
6
7
8
#include <iostream>
int main()
{
    // Either of the following will work with iostream
    std::cout << "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n";
    std::cout << "1" << std::endl << "2" << std::endl << "3" << std::endl << "4" << std::endl << "5" << std::endl << "6" << std::endl << "7" << std::endl << "8" << std::endl << "9" << std::endl << "10" << std::endl;
    for(int i = 1; i<=10; i++) std::cout << i << std::endl;
}

If you are using stdio.h to output text, either of the following will work, too:
1
2
3
4
5
6
7
#include <stdio.h>
int main()
{
    // Either of the following will work with stdio.h
    printf("1\n2\n3\n4\n5\n6\n7\n8\n9\n10");
    for(int i = 1; i<=10;i++) printf("%i\n",i); // %i tells printf to print the parameter as an integer
}


@ Jasondj
Yes, I have. :P
Last edited on Jul 1, 2010 at 3:34pm
Jul 1, 2010 at 3:36pm
Jasondj wrote:
Has anyone really been far even as decided to go even want to do look more like?
Kyon wrote:
@ Jasondj
Yes, I have. :P


You mean you actually understood what he was asking? o_O
Jul 1, 2010 at 3:46pm
Yeah,.. you mean you actually didn't understand what he was asking?

In fact, I've gone so far in deciding to want to be looking more like that I have completely denied any other common relational factors to the said state which you described. Causing me to be any further in deciding to even go and want to look more like than anyone else ever has.
Last edited on Jul 1, 2010 at 3:49pm
Jul 1, 2010 at 3:52pm
In fact, I've gone so far in deciding to want to be looking more like that I have completely denied any other common relational factors to the said state which you described. Causing me to be any further in deciding to even go and want to look more like than anyone else ever has.


Wow, that is impressive. At which do you most can't the least?
Jul 1, 2010 at 3:55pm
No, no, no. You're messing up the sequence!

You've got to be kidding me. I've been further even more decided to use even go need to do look more as anyone can. Can you really be far even as decided half as much to use go wish for that? My guess is that when one really been far even as decided once to use even go want, it is then that he has really been far even as decided to use even go want to do look more like. It's just common sense.
Jul 1, 2010 at 3:55pm
Literally any, I find it rather depressing that I'm the only one going so far to look alike. While there are so many out there that have the potential to be wanting to do look more alike than I. I can't really point out a particular one, just for the notice.
Topic archived. No new replies allowed.