Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
541 B
0
Indexable
Never
#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();
	}
}
Leave a Comment