Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <ctype.h>
- #include <string.h>
- #include <math.h>
- int main()
- {
- int a;
- int howMany;
- int maxAmount = 10;
- printf("How many rows do you want to print? (up to 10) ");
- scanf(" %d", &howMany);
- for(a=1; a<=howMany; a++){
- printf("%d\n", a);
- if(a==maxAmount){
- break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement