Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include <stdio.h>
  2. void main(int argc,char **argv)
  3. {
  4. int c,word_weights[32],w=0,max_element=0;
  5. word_weights[w]=0;
  6. unsigned int l=0;//номер буквы предложения
  7. while((c=getchar())!='\n')
  8. {
  9. if(c!=' ')
  10. {
  11. word_weights[w]++;
  12. l++;
  13. }
  14. else
  15. {
  16. ++w;
  17. word_weights[w]=0;
  18. }
  19. }
  20. for(c=1;c<=w;c++)
  21. if(word_weights[c]>word_weights[c-1]) max_element=word_weights[c];
  22. for(max_element;max_element>=0;max_element--)
  23. {
  24. for(int j=w;j>=0;j--)
  25. {
  26.  
  27. printf("\t");
  28. if(word_weights[j]>(max_element-word_weights[j]))
  29. printf("I");
  30.  
  31. }
  32. printf("\n");
  33. }
  34. }
  35. //1.13
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement