#include <iostream>
int main()
{
int health = 100;
int acorns = 20;
int lives = 3;
float movementSpeed = 6.0f;
// TODO: Suni takes 30 damage
health -= 30;
// TODO: Suni collects 15 acorns
acorns += 15;
// TODO: Suni spends 8 acorns
acorns -= 8;
// TODO: Apply a 25% speed boost
movementSpeed *= 1.25f;
// TODO: Suni loses one life
lives--;
// TODO: Suni gains one life
lives++;
// TODO: Print the four final values
std::cout << "Health: " << health << "\n";
std::cout << "Acorns: " << acorns << "\n";
std::cout << "Lives: " << lives << "\n";
std::cout << "Movement Speed: " << movementSpeed << "\n";
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: