daily pastebin goal
21%
SHARE
TWEET

Untitled

a guest Feb 16th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4.  
  5. typedef struct{
  6.     int identificacao;
  7.     int valorimposto;
  8.     int nmeses;
  9. } impostomunicipal;
  10.  
  11. int main()
  12. {
  13.     impostomunicipal Almada[20];
  14.     int i;
  15.     float multa=0.0;
  16.     for (i=1; i<21; i++){
  17.         Almada[i].identificacao=i;
  18.         Almada[i].valorimposto=0;
  19.         Almada[i].nmeses=0;
  20.     }
  21.    
  22.     for (i=1; i<21; i++){
  23.         printf("Indentificador:\n");
  24.         scanf ("%d", &Almada[i].identificacao);
  25.         printf("Valor do imposto:\n");
  26.         scanf ("%d", &Almada[i].valorimposto);
  27.         printf("Meses em atraso:\n");
  28.         scanf ("%d\n\n", &Almada[i].nmeses);
  29.    
  30.         printf("Identificador: %d\n", Almada[i].identificacao);
  31.         printf("Valor do Imposto: %d\n", Almada[i].valorimposto);
  32.         printf("Meses em atraso: %d\n", Almada[i].nmeses);
  33.         multa = Almada[i].nmeses*0.01 * Almada[i].valorimposto;
  34.         printf("Multa: %f\n\n", multa);
  35.     }
  36.     return 0;
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top