0

write a program to print the following design: & & & & & & & & & & & & & & & & AND & & & & & & & & & & & & & & & & & & & & &

pls help me out!!!!!

22nd Sep 2016, 9:43 AM
Prakhar
Prakhar - avatar
3 Réponses
0
could use a 3d array and use empty " " to fill in air
22nd Sep 2016, 1:24 PM
Justin Vitale
Justin Vitale - avatar
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; }
23rd Sep 2016, 12:21 PM
นายณัฐวุฒิ พร้อมสุข -
นายณัฐวุฒิ พร้อมสุข - - avatar
0
empty or blank ???? space is more suitable lol
25th Nov 2016, 10:04 AM
Az.
Az. - avatar