Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1c 2a 3d 4b 5c
- II 1 a 2 2 4 4 9
- 2b 19,23
- III 1.
- #include <iostream>
- using namespace std;
- void frate(int x, int& y)
- {
- int c, p = 1;
- y = 0;
- while( x != 0 ){
- c = x%10;
- if( c == 9 ){
- y = -1;
- return;
- }
- y = (c+1) * p + y;
- p *= 10;
- x /= 10;
- }
- }
- int main()
- {
- int x, y;
- cin >> x;
- frate(x, y);
- cout << y;
- }
- for(i=0;i<strlen(s);i++)
- if(strchr("OAU",s[i])!=NULL) cout<<"*";
- else cout<<s[i];
- III 2.
- x=a[k][n-k];
- for(j=n-k-1;j>=1;j--){
- a[k][j+1]=a[k][j];
- }
- a[k][1]=x;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement