hi everyone. im new here and it looks like a good place to get some help with school. basically im currently trying to write a program with c++ on a program called Turbo C_5 (i think). what i am trying to do is write a program that will print four columns each with a heading that will have field of fifteen characters. in the first column is the integer in the second is its square in the third is its cube and in the fourth is its square root. under the first line is a space and then starts the printing which should end up looking something like this:
integer square cube square root
1 1 1 1
2 4 8 1.4......
3 9 27 1.7......
........ ..... ... ............
30 .... ..... .....
until thirty. you get the picture. i wrote out the program but every time i use it i get an error message where there shouldnt be one at all. ill type up the program until after where the error message appears.
#include <stdio.h>
#include <math.h>
void main()
{
int x;
double y;
triple z;............. ............... ............... im not sure this is right i dont think so but sqrt a; for lack of a better term (to my knowlege)
printf ("%15d%15d%15d% 15d\n","integer ","double","tri ple","square root"); ...it got messy here it kept giving me on particular error message. it said something about a parenthasis missing. if anyone can help me it would be greatly appreciated.
in humility,
isaac
integer square cube square root
1 1 1 1
2 4 8 1.4......
3 9 27 1.7......
........ ..... ... ............
30 .... ..... .....
until thirty. you get the picture. i wrote out the program but every time i use it i get an error message where there shouldnt be one at all. ill type up the program until after where the error message appears.
#include <stdio.h>
#include <math.h>
void main()
{
int x;
double y;
triple z;............. ............... ............... im not sure this is right i dont think so but sqrt a; for lack of a better term (to my knowlege)
printf ("%15d%15d%15d% 15d\n","integer ","double","tri ple","square root"); ...it got messy here it kept giving me on particular error message. it said something about a parenthasis missing. if anyone can help me it would be greatly appreciated.
in humility,
isaac
Comment