I don't know what I did wrong....thought it looked good. Please help.
If I input 5 it outputsCode:#include <stdio.h> int main () { int star; int num; int a; int b; scanf("%d", &star); num = 0; while(num <= star){ for (a=1; a<=star; a++) { printf("*"); } printf("\n"); star = star - 1; num++; } return 0; }
*****
****
***
and then that is it.
I need to know how come it won't output the last two
**
*