Atps algoritimo etapa 4

Disponível somente no TrabalhosFeitos
  • Páginas : 2 (460 palavras )
  • Download(s) : 0
  • Publicado : 11 de junho de 2012
Ler documento completo
Amostra do texto
#include

#include

#include

#define L 5

#define C 30

//COTAÇÕES DO MÊS DE MAIO/2012//

float matriz[L][C]={{2.41,2.39,2.40,2.44,2.38,2.44,2.42,2.36,2.37,2.38,2.39,2.41,2.40,2.39,2.39,2.39,2.40,2.39,2.39,2.41,2.44,2.45,2.49,2.53,2.50,2.35,2.40,2.66,2.45,2.44},//EURO{2.81,2.99,2.80,2.84,2.88,2.84,2.82,2.86,2.87,2.88,2.89,2.91,2.80,2.89,2.89,2.89,2.90,2.89,2.89,2.91,2.84,2.85,2.89,2.93,2.90,2.95,2.90,2.96,2.95,2.94},//LIBRA ESTER{1.88,1.77,1.85,1.89,1.83,1.84,1.84,1.80,1.79,1.78,1.78,1.75,1.74,1.78,1.67,1.78,1.79,1.79,1.75,1.73,1.79,1.80,1.81,1.82,1.82,1.83,1.84,1.85,1.88,1.85},//DOLAR US{0.41,0.42,0.41,0.44,0.42,0.40,0.48,0.44,0.43,0.45,0.41,0.42,0.40,0.39,0.32,0.37,0.39,0.40,0.45,0.42,0.41,0.45,0.44,0.43,0.43,0.46,0.44,0.41,0.42,0.43},//PESO ARG.{0.50,0.45,0.44,0.42,0.39,0.34,0.37,0.46,0.44,0.45,0.42,0.43,0.44,0.50,0.51,0.52,0.53,0.54,0.57,0.58,0.60,0.61,0.51,0.60,0.66,0.70,0.71,0.71,0.71,0.69},};//RIAL SAUDITA

main(){

int l=0,c=0; //l são as moedas c dias//

char moeda,periodo;

float soma, media, maior, menor;maior=matriz[l][c];

menor=maior;

soma=0;

printf("\n ESCOLHA A COTACAO DESEJADA %c\n\n",moeda);

printf(" 'a' para EURO\n");

printf(" 'b' para LIBRA ESTERLINA\n");printf(" 'c' para DOLAR AMER\n");

printf(" 'd' para PESO ARGEN\n");

printf(" 'e' para RIAL SAUDITA\n");

scanf("%c",&moeda);

switch (moeda){

case 'a': //COTAÇÃODO EURO

printf("\n Escolha o periodo para analise \n\n",periodo);

printf("PRIMEIRO AO DECIMO DIA DO MES TECLE '1' \n");

printf("DECIMO PRIMEIRO AO VIGESIMO DIA TECLE '2'\n");

printf("VIGESIMO PRIMEIRO AO TRIGESIMO DIA TECLE '3' \n");

printf("MES COMPLETO TECLE '4' \n");

periodo=getche();

switch (periodo){

case '1':

for(l=0;l
tracking img