Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void) {
- int i = 0; // increments the number
- int j = 0; // increments the spaces
- int userNum = 3; // holds the number value
- for(i = 0; i <=userNum ; ++i) // increase the number till we hit the usernum limit
- {
- for(j = 0 ; j <= i; ++j) // increase the spaces till we hit the usernum limit
- {
- printf(" ");
- }
- printf("%d", i);
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement