CODE MUST BE IN C++ write a program that loops a number from 1 to 10...

50.1K

Verified Solution

Question

Programming

CODE MUST BE IN C++write a program that loops a number from 1 to 10 thousand and keeps updating a count variable (count variable starts at 0 ) according to these rules:n1 = 14n2 = 54n3 = 123if the number is divisible by n1, increase count by 1if the number is divisible by n2, increase count by 2if the number is divisible by n3, increase count by 3if none of the above conditions match for the number, increase count by the number.

The program must produce one numeric output (it should be thevalue of count)

Answer & Explanation Solved by verified expert
4.0 Ratings (498 Votes)
Note If the library isnot present on your local machine You can alternatively use    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students