Whats wrong here ? Why the code output prints some extra lines?
Input:line number=n.
Enter number=num.If line=4 and num=2
, the output will be....
2
4
8
16
My code is....
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int n,num,i,j,s=1,m;
cin>>n>>num;
for(i=1;i<=n;i++)
{
m=1;
while(s<=j){
m=num*m;
s++;
}
cout<<m;
cout<<endl;
}
getch();
return 0;
}