#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a>b) { if(b>c) cout<<c<<"->"<<b<<"->"<<a<<endl; else{ if(c>a) cout<<b<<"->"<<a<<"->"<<c<<endl; else{ cout<<b<<"->"<<c<<"->"<<a<<endl; } } } else{ if(a>c) cout<<c<<"->"<<a<<"->"<<b<<endl; else{ if(c>b) cout<<a<<"->"<<b<<"->"<<c<<endl; else{ cout<<a<<"->"<<c<<"->"<<b<<endl; } } } return 0; }
#include<iostream> #include<stdio.h> #include<cstring> using namespace std; int main() { int m=0; char A[10000] = { 0 }; fgets(A, sizeof(A), stdin); char B[10000] = { 0 }; fgets(B, sizeof(B), stdin); int lea = strlen(A); int leb = strlen(B); for (int i = 0; i < lea; i++) { m = 0; for (int j = 0; j < leb; j++) { if (A[i] == B[j]) { m = 1; break; } } if (m == 0) cout << A[i]; } cout << endl; return 0; }
标签:7.14,std,leb,cout,int,include From: https://www.cnblogs.com/xuxingkai/p/17555150.html