Simple IDE Output Question
John Abshier
Posts: 1,116
Code run
Why is third line of output indented one space?
Simple IDE version 0.9.21
John Abshier
/*
Variables and Calculations.c
Add two integer values together and display the result.
http://learn.parallax.com/propeller-c-start-simple/variables-and-math
*/
#include "simpletools.h" // Include simpletools
int main() // main function
{
pause(1000); // Wait 1 s for host computer
int a = 25; // Initialize a variable to 25
int b = 17; // Initialize b variable to 17
int c = a + b; // Initialize c variable to a + b
printf("a = %d, b = %d\n", a,b);
printf("c = %d\n ", c); // Display decimal value of c
c = a - b;
printf("a = %d, b = %d\n", a,b);
printf("c = %d\n ", c); // Display decimal value of c
}
Why is third line of output indented one space?
a = 25, b = 17 c = 42 a = 25, b = 17 c = 8
Simple IDE version 0.9.21
John Abshier

Comments
printf("c = %d\n ", c);
Can you spot the extra space after the \n ?
Thanks
John Abshier