
Gaokdek
5 год назад
Даю 50 поинтов !!! Написать программы на языке С++ 1) Данные числа x,y являются координатами точки, лежащей в первой координатной четверти. 2) Даны два трехзначных числа. Поменять местами 2-ю цифру первого на 3-ю цифру второго.
ОТВЕТЫ

Георгий
Oct 24, 2020
1)
#include<iostream>using namespace std;int main(){ int x,y; cin>>x>>y; if(x<0 && y>0) cout<<"YES"; else cout<<"NO"; return 0;}
2)
#include<iostream>using namespace std;int main(){ int n,m,s; cin>>n>>m; s=(n/100*100)+(m%10*10)+n%10; cout<<s; return 0;}
#include<iostream>using namespace std;int main(){ int x,y; cin>>x>>y; if(x<0 && y>0) cout<<"YES"; else cout<<"NO"; return 0;}
2)
#include<iostream>using namespace std;int main(){ int n,m,s; cin>>n>>m; s=(n/100*100)+(m%10*10)+n%10; cout<<s; return 0;}
460
Смежные вопросы: