+ 1

To print the pattern

I I C I C S I C S E

10th Apr 2017, 12:47 PM
Vivek
Vivek - avatar
2 Answers
+ 2
#include <iostream> int main() { char characters[] = {'I', 'C', 'S', 'E'}; const int SIZE = sizeof(characters) / sizeof(char); for(int i = 0; i < SIZE; ++i){ for(int j = 0; j <= i; ++j) { std::cout << characters[j] << " "; } std::cout << std::endl; } }
10th Apr 2017, 12:52 PM
Dennis
Dennis - avatar
21st Jul 2020, 1:02 AM
shubham kumar
shubham kumar - avatar