Advertisement
Adm1n_0v3rride

C/C++ sentence and or word length program

Nov 20th, 2017
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. # This program is designed to help programmers calcuate how many words are in a sentance For C/C++
  2. #          
  3. #           email me at: dopegalaxy131@gmail.com
  4. #
  5. #   char string[10] = "hello,world!"; This is wrong because the original sentance has a length of 12
  6. #  
  7. #       but with my program....
  8. #  
  9. #   char string[12] = "Hello,world!";
  10. #
  11. #           Now with this program, the correct length has been placed.
  12. #
  13. #       This program was made by Adm1n_0v3rride (C) 2017
  14. #!/usr/bin/env python3
  15.  
  16. string = input("Please enter the word that you are trying to spell: ")
  17.  
  18. length = len(string)
  19.  
  20. print(length)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement