Advertisement
rotti321

T21/2021 BAC

Jun 4th, 2021
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1.  
  2. 1c 2a 3d 4b 5c
  3. II 1 a 2 2 4 4 9
  4.  
  5. 2b 19,23
  6.  
  7. III 1.
  8. #include <iostream>
  9.  
  10. using namespace std;
  11.  
  12. void frate(int x, int& y)
  13. {
  14. int c, p = 1;
  15. y = 0;
  16. while( x != 0 ){
  17. c = x%10;
  18. if( c == 9 ){
  19. y = -1;
  20. return;
  21. }
  22. y = (c+1) * p + y;
  23. p *= 10;
  24. x /= 10;
  25. }
  26. }
  27.  
  28. int main()
  29. {
  30. int x, y;
  31. cin >> x;
  32. frate(x, y);
  33. cout << y;
  34. }
  35.  
  36.  
  37. for(i=0;i<strlen(s);i++)
  38. if(strchr("OAU",s[i])!=NULL) cout<<"*";
  39. else cout<<s[i];
  40.  
  41. III 2.
  42. x=a[k][n-k];
  43. for(j=n-k-1;j>=1;j--){
  44. a[k][j+1]=a[k][j];
  45. }
  46. a[k][1]=x;
  47.  
  48.  
  49. III.3.
  50.  
  51. #include <iostream>
  52.  
  53. using namespace std;
  54.  
  55. int main() {
  56. int x,nm,nb=1;
  57. cin>>nm;
  58. while(cin>>x){
  59. if(x>=nm)
  60. nb++;
  61. }
  62. cout<<nb;
  63. }
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement