Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- bool paral(int& bx, int& by, int& cx, int& cy, int& j, int& i){
- if(bx==i && j<=cy && j>=by || cy==j && j>=bx && j<=cx || by==j && i<= && i>= || cx==i && &&)
- return 1;
- return 0;
- }
- bool punct(int& ax,int& ay, int& i, int& j){
- if(ax==i&&ay==j)
- return 1;
- return 0;
- }
- int main()
- {
- int ax,ay;
- int bx, cx, by, cy;
- cin>>ax;
- cin>>ay;
- bx=1;
- cx=6;
- by=1;
- cy=4;
- if(ax>=bx && ax<=cx && ay>=by && ay<=cy){
- cout<< "ok" << endl;
- }
- for (int j=0 ; j<20; j++){
- for (int i=0; i<20; i++){
- if (paral(bx,by,cx,cy,j,i)&& punct(ax,ay,i,j)){
- cout<<"# ";
- }
- else
- cout<<" ";
- }
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement