Guest User

Untitled

a guest
May 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. void main()
  4. {
  5. float a=0, b=0, c;
  6. char s, prs;
  7. printf("\nVvedite predlogenie:\n");
  8. s=getchar();
  9. while(s!='\n')
  10. {
  11. b++;
  12. if(s==' ')
  13. a++;
  14. s=getchar();
  15. }
  16. c=(a*100)/b;
  17. printf("\n a=%f",a);
  18. printf("\nprobely sostovlyaut c=%f\n",c);
  19. getch();
  20. }
Add Comment
Please, Sign In to add comment