Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void vvod_chisel(int a[],int&max, int&chetchik)
- {
- bool block=false;
- for (int i=0; i<=1000; i++)
- {
- if (block==false)
- {
- cout << "vvedite chislo: ";
- chetchik++;
- cin >> a[i];
- if (a[i]>max)
- {
- max=a[i];
- }
- }
- if (a[i]==0)
- {
- block=true;
- }
- }
- }
- void cikil(int n,char b)
- {
- for (int i=0;i<n;i++)
- cout<<b;
- }
- int main()
- {
- int chisla[1000];
- bool block=false;// block vvoda
- int vvchislo;
- int chetchik=0;
- int max=0;
- int kolprob;
- vvod_chisel(chisla,max,chetchik);
- kolprob=max/2+1;
- for (int i=0;i<chetchik;i++)
- {
- max=kolprob-0.5*chisla[i];
- cikil(max,' ');
- cikil(chisla[i],'*');
- cout<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement