Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,b,c,d;
- cout<<"a=";cin>>a;
- cout<<"b=";cin>>b;
- cout<<"c=";cin>>c;
- if (a<d)
- d=a;
- if (b<d)
- d=b;
- if (c<d)
- d=c;
- cout<<"A legkisebb:"<<d;
- return 0;
- }
- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,b;
- int x;
- cout<<"a=";cin>>a;
- cout<<"b=";cin>>b;
- x=(-b)/a;
- cout<<a<<"x+"<<b<<endl;
- cout<<"x="<<x;
- return 0;
- }
- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,b,c,d,e,y;
- cin>>a;
- b=a/1000;
- c=a/100%10;
- d=a/10%10;
- e=a%10;
- y=e*1000+d*100+c*10+b;
- if (a==y)
- cout<<"A szam palindrom";
- else
- cout<<"A szam nem palindrom";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment