All pastes #2063973 Raw Edit

Untitled

public text v1 · immutable
#2063973 ·published 2011-05-19 00:51 UTC
rendered paste body
int main(int argc, char *argv[])
{
  int codPart, notaPart, notaMaior, notaMenor;
  char tecla;
 
  do
   { 
    printf("Inserir o codigo do participante: ");
    scanf("%d", &codPart);  
    printf("Insira a nota do participante: ");
    scanf("%d", &notaPart);  
    printf("\n\n");
    fflush(stdin);   
    
     
    printf("Inserir mais participantes?\n");
    printf("Tecle S ou s para sim: ");
    scanf("%c", &tecla);
    printf("\n");    
    
  }   
   while (tecla == 'S' || tecla == 's');
   
   
    notaMaior = notaPart;
    notaMenor = notaPart;  
    
   if (notaPart > notaMaior)
   {
     notaMaior = notaPart;
   }
   else
   {
      notaMenor = notaPart;
    }
        
    printf("O vencedor possui a nota: %d", notaMaior);
    printf("\n");