0

Hai,
Can anyone help me to solve this program.

Write a function in C++ to count number of words starting with “amend” in the text file named as “Amendment.txt”
Eg:-
A contract to deliver something to a customer once a month can be amended if the customerwants it delivered once a week. Usually, everyone involved in the contract must agree to the
amendment before it goes into effect. Most contracts are written with rules about amendments
The Output should be
No of words starting with amend : 3

4
Contributors
3
Replies
23
Views
1 Year
Discussion Span
Last Post by David W
0

Sounds like you need to learn how to read argvars, open a file handle, read a file handle, parse a string in a buffer, and increment a value.

Good luck!

0

Write a program which adds all the natural numbers below 3000 and greater than 500 that
are multiples of 3 or 5 but not both in c++.

0

@Atiq_1 ... you may not yet have learned that it is NOT appropriate to 'hijack' an other poster's thread ? So please post your beginner level question in a NEW thread.

Also, you need to know that you MUST make an effect to code a solution and post the code that you have tried, if you actually expect anyone here to see how to help you. <Your homework MUST be YOUR work.> We are glad to help you to learn ... but we can not do your work for you, or else we would be the ones to be hired by any of your possible future employers.

@Hia ... please read and understand the (2nd part of the) above also.
HINT! You could use a loop ... while( fin >> word ) { // ... // }... to read the words in your file ... etc.

Edited by David W

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.