Write a program that reads a paragraph from the keyboard and processes it in the following fashion:
- Calculate the number of words in the paragraph
- Calculate the number of lines of text in the paragraph
- Calculate the number of characters that are the same as the 3rd letter of your last name.
Terminate the paragraph with special character (it should be the character above numerical key of the regular keyboard; your numerical key = [(the last digit of your ID) MODULO 7] +1).
Display results on screen.
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
include irvine32.inc ; from Irvine CDROM
getname_msg byte "enter your last name ", 0
getid_msg byte "enter your id ", 0
paragraph byte "enter paragraph : ", 0
words byte "the number of words in the paragraph ", 0
lines byte "the number of lines of text in the paragraph ", 0
sames byte "the number of characters that are the same as the 3rd letter of your last name ", 0
word_num dword 0
line_num dword 1
third_letter_count dword 0
CR equ 0Dh ; carrier return
last_name byte 30 dup(0)
id byte 20 dup(0)
last_name_bytes_count dword ?
third_letter byte ?
terminate_letter byte ?
previous byte ' '
call getid ; get id and special charater
call getname ; get name and the 3rd charatger...
This is only a preview of the solution. Please use the purchase button to see the entire solution