Untitled
unknown
c_cpp
2 years ago
541 B
4
Indexable
#include <iostream>
#include <SFML/Graphics.hpp>
using namespace std;
int main() {
setlocale(LC_ALL, "Russian");
int w, h;
w = 500;
h = 500;
float radius, x, y;
cout << "Радиус: ";
cin >> radius;
cout << "Координаты центра: ";
cin >> x >> y;
sf::RenderWindow window(sf::VideoMode(w, h), "Ilya loh");
while (window.isOpen()) {
sf::CircleShape cr(radius);
cr.setFillColor(sf::Color(255, 0, 255));
cr.setPosition( x - radius, y - radius);
window.draw(cr);
window.display();
}
}Editor is loading...
Leave a Comment