- #1
Dili
- 13
- 0
I need to write a c program to get a table like this
______0 ________1 _________2________3 ...(underscore for presentation only)
10 sqrt(0*10) sqrt(1*10)
11
12
..
..
i know how to get the first row while saving it in an array.
but i can't find how to write the rest of the lines.
is tehre a easy way using only for loops?
here is a part of the code I've written
#include<stdio.h>
#include<math.h>
int main()
{
int i,j,num[20];
printf("\t");
for(i=0;i<9;i++)
num=i;
{
printf("%d\t",num);
}
______0 ________1 _________2________3 ...(underscore for presentation only)
10 sqrt(0*10) sqrt(1*10)
11
12
..
..
i know how to get the first row while saving it in an array.
but i can't find how to write the rest of the lines.
is tehre a easy way using only for loops?
here is a part of the code I've written
#include<stdio.h>
#include<math.h>
int main()
{
int i,j,num[20];
printf("\t");
for(i=0;i<9;i++)
num=i;
{
printf("%d\t",num);
}
Last edited: