Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void main(int argc,char **argv)
- {
- int c,word_weights[32],w=0,max_element=0;
- word_weights[w]=0;
- unsigned int l=0;//номер буквы предложения
- while((c=getchar())!='\n')
- {
- if(c!=' ')
- {
- word_weights[w]++;
- l++;
- }
- else
- {
- ++w;
- word_weights[w]=0;
- }
- }
- for(c=1;c<=w;c++)
- if(word_weights[c]>word_weights[c-1]) max_element=word_weights[c];
- for(max_element;max_element>=0;max_element--)
- {
- for(int j=w;j>=0;j--)
- {
- printf("\t");
- if(word_weights[j]>(max_element-word_weights[j]))
- printf("I");
- }
- printf("\n");
- }
- }
- //1.13
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement