0
write a program to print the following design: & & & & & & & & & & & & & & & & AND & & & & & & & & & & & & & & & & & & & & &
pls help me out!!!!!
3 Respuestas
0
could use a 3d array and use empty " " to fill in air
0
1)
#include <iostream>
using namespace std;
int main()
{
int n,j,i=0;
cin>>n;
int k=n*2-1;
while(n--)
{
j=0;
while(j<k)
{
if(j<i)
{
cout<<" ";
}
else
{
cout<<"&";
}
j++;
}
cout<<endl;
i++;
k--;
}
return 0;
}
0
empty or blank ???? space is more suitable lol