#C++
#head
#function
struct Bullet {
    float positionX;
    float positionY;
    float velocity;
    float angle;
};

void updateBulletPosition(Bullet& bullet, float deltaTime) {
    float radians = bullet.angle * (M_PI / 180.0f);
    float velocityX = bullet.velocity * cos(radians);
    float velocityY = bullet.velocity * sin(radians);
    
    bullet.positionX += velocityX * deltaTime;
    bullet.positionY += velocityY * deltaTime;
}

int main() {
    Bullet bullet;
    bullet.positionX = 0.0f;
    bullet.positionY = 0.0f;
    bullet.velocity = 100.0f; 
    bullet.angle = 45.0f; 
    
    float deltaTime = 0.1f; 
    
    for (int i = 0; i < 10; i++) {
        updateBulletPosition(bullet, deltaTime);
        std::cout << "Bullet Position: (" << bullet.positionX << ", " << bullet.positionY << ")\n";
    }
    
    return 0;
}