Program to count number of letters in a word


Write C++ programs to execute the following:

Question 1) Read the series of integers and find out the following information about each integer:

a) Is it a multiple of 7, 11 or 13? One function

b) Is the sum of the digits odd or even? One function

c) What is a square root value (if positive)? One function

d) Is it a prime number? One function

You must have at least four functions and label all output.

Use following sample input data:

104
3773
13
121
77
30751

Question 2) Write the program which reads several lines from the data file and prints each word of the file on separate line of the output file followed by the number of letters in that word.

Also print count of words in the file on the screen when done. Suppose that words are separated by one or more blanks. (Use modular programming)

Use at least two functions.

Use the following as your sample input data:

Sample output:

Write 5

a 1

program 7

The total number of words is 59

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Program to count number of letters in a word
Reference No:- TGS04699

Expected delivery within 24 Hours