All pastes #2066367 Raw Edit

Stuff

public c v1 · immutable
#2066367 ·published 2011-05-21 21:58 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>         int valmat () {                          int matv,mat,n,x1,x2,x3;                     do {                                      printf(" Digite a matricula: " );                   scanf("%d",&mat);                                                              if ( ( mat !=0 ) && ((mat >= 1001) && (mat <= 9999)) ) {                                    n = (mat/1000);                  x1 = (mat%1000)/100;                  x2 = (mat%1000%100)/10;                  x3 = (mat%1000%100%10);                                                    printf ("\n Matricula e' valida \n\n" );                  mat = matv;                 return n;                                  }                                  else {                       printf("\n Matricula e' invalida \n\n" );                              }                                                        if ( mat == 0 ) {                    return 0 ;                    }                                       }while( ( mat != 0 ) )  ;                                                                                       }                                                   int recmatf () {                                          int n,a,matv;                                          a = valmat() ;                                              printf(" \n O valor de Filial e' : %d  \n\n", a);                                              }                                          int recmats () {                                          int n,b,matv;                                          b = valmat() ;                                              printf(" \n O valor de sequencial  e' : %d \n\n", b);                                              }                                                  int main () {                     int e,f;                                          e = recmatf();                                                              system("pause");                                    }