How to print the following pattern in C or C++? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 8

How to print the following pattern in C or C++?

ABCDEDCBA ABCD DCBA ABC CBA AB BA A A Please try to confine only to C or C++

1st Nov 2017, 12:42 PM
Infinity
Infinity - avatar
1 Réponse
+ 8
Is this a challenge or a question ? Well if its a question then try using matrix try this case for printing the triangle cin>>sz; for(i=0;i<sz;i++) { for(j=0;j<sz;j++) { if(i==j&&I+j==sz-1) { cout<<mat[i][j]<<" "; } else { cout<<" "<<" "; } } cout<<endl; }
1st Nov 2017, 1:36 PM
RZK 022
RZK 022 - avatar