Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INPUT
- 5
- OUTPUT
- 1 2 3 4 5
- 6 7 8 9 10
- 11 12 13 14 15
- 16 17 18 19 20
- 21 22 23 24 25
- ----------------------
- #include <stdio.h>
- int main(){
- int n;
- scanf("%d",&n);
- int t=1;
- for(int i=1;i<=n;i++){
- for(int j=1;j<=n;j++){
- printf("%d" ,t++);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement