double space:

#include <iostream>
using namespace std;
#include <string>

int main ()
{
int a;
int b;
int c;

a = 100;
b = 10;
c = 310;
a++; // one is added to "a"
cout << a << endl; // one space
cout << b << endl; // one space - I WANT A DOUBLE SPACE HERE.
cout << c << " Chester Guinyard\n" << endl; // same line
cout << "Good job! Chester " << a << "\n"; // same line

}
How do I double space the (cout << a << endl)
and (cout << b << endl)

You should use [ code ] [ /code ] tags (without spaces) around your stuff, and also please indent, perhaps with four spaces...

By the way, the things you keep calling spaces are called "newlines", done with std::endl or simply adding "\n".

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include <string>

using namespace std;

int main ()
{
    int a;
    int b;
    int c;

    a = 100;
    b = 10;
    c = 310;
    a++; // one is added to "a"
    cout << a << endl; // one space
    cout << b << endl << endl; // two newlines
    cout << c << " Chester Guinyard\n" << endl; // same line
    cout << "Good job! Chester " << a << "\n"; // same line

    return 0;
}
Topic archived. No new replies allowed.