#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int i= 0 ;
struct pessoas {
char nomealuno[ 60 ] ;
int numeromeca;
char rua[ 90 ] ;
char curso[ 200 ] ;
int dia;
int mes;
int ano;
int nporta;
int codigopostal1;
int codigopostal2;
int num;
} ;
char buff[ 20 ] ;
int lerInt( ) {
int numero;
fgets ( buff
, sizeof ( buff
) , stdin
) ; return numero;
}
int main( ) {
struct pessoas aluno[ 20 ] ;
fgets ( aluno
[ i
] .
nomealuno , sizeof ( aluno
[ i
] .
nomealuno ) , stdin
) ;
printf ( "Numero mecanografico : " ) ; aluno[ i] .numeromeca = lerInt( ) ;
printf ( "Data de nascimento :\n " ) ; aluno[ i] .dia = lerInt( ) ;
aluno[ i] .mes = lerInt( ) ;
aluno[ i] .ano = lerInt( ) ;
fgets ( aluno
[ i
] .
rua , sizeof ( aluno
[ i
] .
rua ) , stdin
) ;
aluno[ i] .nporta = lerInt( ) ;
aluno[ i] .codigopostal1 = lerInt( ) ;
aluno[ i] .codigopostal2 = lerInt( ) ;
printf ( "Em que curso pertence o aluno?" ) ; fgets ( aluno
[ i
] .
curso , sizeof ( aluno
[ i
] .
curso ) , stdin
) ;
printf ( "\n \n Nome.: %s\n " , aluno
[ i
] .
nomealuno ) ; printf ( "\n Numero mecanografico.:%8d\n " , aluno
[ i
] .
numeromeca ) ; printf ( "\n Data de Nascimento.:%2d / %2d / %4d\n " , aluno
[ i
] .
dia , aluno
[ i
] .
mes , aluno
[ i
] .
ano ) ; printf ( "\n Rua .: %s\n " , aluno
[ i
] .
rua ) ; printf ( "\n N da porta .: NÂș %3d\n " , aluno
[ i
] .
nporta ) ; printf ( "\n codigo postal .: %d-%d\n " , aluno
[ i
] .
codigopostal1 , aluno
[ i
] .
codigopostal2 ) ; printf ( "\n Curso .: %s\n " , aluno
[ i
] .
curso ) ;
return 0 ;
}
I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0cmluZy5oPgojaW5jbHVkZSA8Y3R5cGUuaD4KCmludCBpPTA7CnN0cnVjdCBwZXNzb2FzIHsKICAgIGNoYXIgbm9tZWFsdW5vWzYwXTsKICAgIGludCBudW1lcm9tZWNhOwogICAgY2hhciBydWFbOTBdOwogICAgY2hhciBjdXJzb1syMDBdOwogICAgaW50IGRpYTsKICAgIGludCBtZXM7CiAgICBpbnQgYW5vOwogICAgaW50IG5wb3J0YTsKICAgIGludCBjb2RpZ29wb3N0YWwxOwogICAgaW50IGNvZGlnb3Bvc3RhbDI7CiAgICBpbnQgbnVtOwp9OwoKY2hhciBidWZmWzIwXTsKCmludCBsZXJJbnQoKXsKICAgIGludCBudW1lcm87CiAgICBmZ2V0cyhidWZmLCBzaXplb2YoYnVmZiksIHN0ZGluKTsKICAgIHNzY2FuZihidWZmLCAiJWQiLCAmbnVtZXJvKTsKICAgIHJldHVybiBudW1lcm87Cn0KCmludCBtYWluKCkgewogICAgc3RydWN0IHBlc3NvYXMgYWx1bm9bMjBdOwoKICAgIHByaW50ZigiTm9tZSAgICA6ICIpOwogICAgZmdldHMoYWx1bm9baV0ubm9tZWFsdW5vLCBzaXplb2YoYWx1bm9baV0ubm9tZWFsdW5vKSwgc3RkaW4pOwoKICAgIHByaW50ZigiTnVtZXJvIG1lY2Fub2dyYWZpY28gIDogIik7CiAgICBhbHVub1tpXS5udW1lcm9tZWNhID0gbGVySW50KCk7CgogICAgcHJpbnRmKCJEYXRhIGRlIG5hc2NpbWVudG8gICAgOlxuICIpOwogICAgcHJpbnRmKCJkaWEuOiIpOwogICAgYWx1bm9baV0uZGlhID0gbGVySW50KCk7CgogICAgcHJpbnRmKCJtZXMuOiIpOwogICAgYWx1bm9baV0ubWVzID0gbGVySW50KCk7CgogICAgcHJpbnRmKCJhbm8uOiIpOwogICAgYWx1bm9baV0uYW5vID0gbGVySW50KCk7CgogICAgcHJpbnRmKCJSdWEgICA6ICIpOwogICAgZmdldHMoYWx1bm9baV0ucnVh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