Advertisement
CosmicFox33

Untitled

May 16th, 2021
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. char f;
  4. int n,a,b,c,d;
  5. int c1=48, c0=48, c2=57, a1=65, a0=65, a2=90, b1=97, b0=97, b2=122;
  6. int main()
  7. {
  8.     cin >> n >> a >> b >> c;
  9.     d=n-(a+b+c);
  10.     b=b+d;
  11.     for (int i=c0; c!=0; i++){
  12.         if (i>c2) i=c0;
  13.         int(f)=i;
  14.         cout << char(f);
  15.         c--;
  16.     }
  17.     for (int i=a0; a!=0; i++){
  18.         if (i>a2) i=a0;
  19.         int(f)=i;
  20.         cout << char(f);
  21.         a--;
  22.     }
  23.     for (int i=b0; b!=0; i++){
  24.         if (i>b2) i=b0;
  25.         int(f)=i;
  26.         cout << char(f);
  27.         b--;
  28.     }
  29.  
  30.  
  31.     return 0;
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement