Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  test
Language: C/C++
Code:
// This program asks the Pokemon Go player how many candies of a certain Pokemon he or she has.
#include <iostream>
using namespace std;
int main()
{

     int caterpie_candies,
          weedle_candies,
          pidgey_candies,
          rattata_candies,
          spearow_candies,
          total_caterpie_evolves,
          total_weedle_evolves,
          total_pidgey_evolves,
          total_rattata_evolves,
          total_spearow_evolves,
          total_evolves;

     cout << "This program calculates the ";
     cout << "total possible evolves, thanks to Marco." << endl;
     cout << endl;

     cout << "How many caterpie candies do you have?" << endl;
     cin >> caterpie_candies;
     cout << "How many weedle candies do you have?" << endl;
     cin >> weedle_candies;
     cout << "How many pidgey candies do you have?" << endl;
     cin >> pidgey_candies;
     cout << "How many rattata candies do you have?" << endl;
     cin >> rattata_candies;
     cout << "How many spearow candies do you have?" << endl;
     cin >> spearow_candies;

     total_caterpie_evolves = (caterpie_candies) / (12);
     total_weedle_evolves = (weedle_candies) / (12);
     total_pidgey_evolves = (pidgey_candies) / (12);
     total_rattata_evolves = (rattata_candies) / (50);
     total_spearow_evolves = (spearow_candies) / (50);
     total_evolves = (total_caterpie_evolves)+(total_weedle_evolves)+(total_pidgey_evolves)+(total_rattata_evolves)+(total_spearow_evolves);
     cout << endl;
     cout << "The total amount of possible evolutions are " << total_evolves << "." << endl;
     return 0;

}
Comments: