Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- #define a 40
- #include <locale.h>
- int main (){
- setlocale(LC_ALL,"Portuguese");
- struct {
- char nome [a];
- int cpf;
- char rg[a];
- char cidade[a];
- } data[2] ;
- struct{
- int cod;
- int qtd;
- int cpf;
- }compra[2];
- int i, j;
- for(j=1; j<3;j++) {
- printf ("Digite os dados do cliente %d na forma: \n Nome, CPF, RG, Cidade:\n", j);
- scanf ("%s %d %d %s", &data[j].nome[j],&data[j].cpf, &data[j].rg, &data[j].cidade[j]);
- compra[j].cod = 0 + j;
- } srand (time(NULL));
- for (i=0;i<1; i++){
- system("cls");
- if (compra[i].qtd >= 5)
- if (data[i].cpf == compra[i].cpf )
- printf ("O vencedor da Ferrari F-50 é o código: \n :::( %d )::: \n\n\", (rand() % 10000)+1");
- }
- return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement