Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,b,d,n,i,k,ma,l,m;
- a=30;
- int t[a];
- b=0;
- d=0;
- i=0;
- n=0;
- k=0;
- cin >> n;
- while (n != 0)
- {
- t[b]=n;
- cout << endl;
- b++;
- cin >> n;
- }
- ma = t[0];
- while (i < b)
- {
- if (t[i] > ma)
- {
- ma = t[i];
- }
- i=i+1;
- }
- l=0;
- m=ma;
- b=ma*b;
- while (b>l)
- {
- if(t[k]>0)
- {
- k++;
- cout << " *";
- }
- l++;
- k++;
- if(l=ma)
- {
- ma=ma+m;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement