What more to do if .....

closed account (1Ujz3TCk)
I want to get the following output;

5 25
6 36
7 49
8 64
9 81
10 100


and my code is as under


1
2
3
4
5
6
7
8
9
10
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{clrscr ();
int i,pow;
for(i=5;i<=10;i++)
pow=(i,2);
cout<<i<<endl;
getch();}
Last edited on
pow is a function in math.h, don't declare it as an int and replace lines 8 and 9 with cout << i << ' '<< pow(i,2.0) << endl;
closed account (1Ujz3TCk)
when i did as you said bazzy ,there is an error call of nonfunction. what 2 do next??
Are you still declaring pow? (line 6)
closed account (1Ujz3TCk)
Got the correct output afterwards.well thanks for your help.Will you help me in the future.will you be my mentor?
If you ask something here and I know how to solve your problem, I will certainly help you
Topic archived. No new replies allowed.