Solution for Exercise 6-10
ex0610
#include <stdio.h>
int main()
{
int shadrach=701;
int meshach=709;
int abednego=719;
printf("Shadrach is %d\nMeshach is %d\nAbednego is %d\n",\
shadrach,meshach,abednego);
return(0);
}
Notes
* You can also specify the variables on the same line, just as you would declare multiple variables. You assign them values, but separate each with a comma, as shown here:
#include <stdio.h>
int main()
{
int shadrach=701,meshach=709,abednego=719;
printf("Shadrach is %d\nMeshach is %d\nAbednego is %d\n",\
shadrach,meshach,abednego);
return(0);
}
* Granted, this presentation doesn't make the code as readable as it could. I believe the second example from Exercise 6-8 on this web site presents the code in the most readable manner.
Copyright © 1997-2025 by QPBC.
All rights reserved
