Advertisement
_Kripaka001_

numbers 2(4)

Oct 22nd, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int a,b,d,n,i,k,ma,l,m;
  8. a=30;
  9. int t[a];
  10.  
  11. b=0;
  12. d=0;
  13. i=0;
  14. n=0;
  15. k=0;
  16.  
  17.  
  18. cin >> n;
  19. while (n != 0)
  20. {
  21. t[b]=n;
  22. cout << endl;
  23. b++;
  24. cin >> n;
  25.  
  26. }
  27.  
  28. ma = t[0];
  29.  
  30.  
  31. while (i < b)
  32. {
  33. if (t[i] > ma)
  34. {
  35. ma = t[i];
  36.  
  37. }
  38. i=i+1;
  39. }
  40. l=0;
  41. m=ma;
  42. b=ma*b;
  43. while (b>l)
  44. {
  45.  
  46. if(t[k]>0)
  47. {
  48. k++;
  49. cout << " *";
  50. }
  51. l++;
  52. k++;
  53. if(l=ma)
  54. {
  55.  
  56. ma=ma+m;
  57.  
  58. }
  59.  
  60.  
  61. }
  62.  
  63.  
  64.  
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement