Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- main(){
- int mat[3][3];
- int l,c,n;
- for(l=0;l<3;l++){
- printf("\n Digite numero inteiro entre 1 e 15:");
- for(c=0;c<3;c++){
- inicio:
- scanf("%d",&n);
- if((n<1) || (n>15)){
- printf("\n Erro! Numero Invalido, digite novamente:");
- goto inicio;
- }
- }}
- printf("\n |Matriz 3x3|\n");
- for(l=0;l<3;l++){
- for(c=0;c<3;c++){
- printf("\t%d",mat[l][c]);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement