Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. struct circle {
  6.     float x,y,radius;
  7.  
  8.     void setRadius(float r){
  9.         radius=r;
  10.  
  11.     }
  12.     float getRadius(){
  13.         return radius;
  14.  
  15.     }
  16.     void setCentrX(float cx){
  17.         x=cx;
  18.     }
  19.     float getCentrX(){
  20.         return x;
  21.     }
  22.     void setCentrY(float cy){
  23.         y=cy;
  24.     }
  25.     float getCentrY(){
  26.         return y;
  27.     }
  28.  
  29. };
  30. int main{
  31.     circle c1;
  32.     c1.setRadius(5);
  33.     cout<<getRadius()<< endl;
  34.  
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement