Lecture Name= CPP-Loops-ABCD Pyramid Pattern

In this tutorial, the instructor used the for loop. My question is can we use the while loop?why yes or not?
If so how to write the code

@Riankk hey krishanu we can do this also with while loop. go through this link