Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <iostream>
- using namespace std;
- int main() {
- int cont;
- int fome;
- int qtd;
- char nome [30];
- scanf ("%d",&fome);
- scanf("%d",&qtd);
- int resposta;
- while (cont < qtd){
- gets(nome);
- if (nome == "Arroz"){
- resposta += 25;
- } else if (nome == "Churrasco de Animal do Mar"){
- resposta += 100;
- } else if (nome == "Paella Vestido de Camarao"){
- resposta += 70;
- } else if(nome == "Massa de Tinta de Lula Rosa") {
- resposta += 55;
- } else {
- resposta += 15;
- }
- }
- if (resposta >= fome) {
- printf("Sucesso, vamos todos celebrar.");
- } else {
- printf("Pell, voe e traga mais comida ou a festa sera arruinada!");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement