Ex4-cedulas.txt

  • Uploaded by: Gustavo Sousa
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Ex4-cedulas.txt as PDF for free.

More details

  • Words: 58
  • Pages: 1
#include <stdio.h> int main() { int i, valor, notas[] = { 100, 50, 20, 10, 5, 2, 1 }; scanf("%d", &valor); printf("%d\n", valor); for (i = 0; i < 7; i++) { int tamanho_nota = notas[i]; int qtd_notas = valor / tamanho_nota; printf("%d nota(s) de R$ %d,00\n", qtd_notas, tamanho_nota); valor = valor % tamanho_nota; }

}

return 0;

More Documents from "Gustavo Sousa"

Ex4-cedulas.txt
May 2020 7
November 2019 9
Ex3-bhaskara.txt
May 2020 12