An Arabian sultan called upon a neighboring chieftain to help in a feud. The chi
ID: 3562165 • Letter: A
Question
An Arabian sultan called upon a neighboring chieftain to help in a feud. The chief agreed and said that the price for his services would be all of the grains of wheat packed on a checkerboard as follows: one grain on the first square, two grams on the second square, four grains on the third square and so forth, doubling the number of grains for each subsequent square. The sultan though the chieftain was a fool and happily agreed. However, the sultan was driven into How many grains of wheat did the chieftain end up with? If a bushel of wheat contains 4.2E5 grains, how many bushels were there? Is this figure more or less than the yearly US wheat crop of about 2.13 billion bushels.Write a C++ program to compute the total number of grains of wheat asked by the chieftain. Your program should generate a table showing the number of grains for each square of the checkerboard. The table should have two columns: Square Number of Grains Below the table, your program should output the number of grains in terms of number of bushels.Explanation / Answer
#include using namespace std; int main(){ long double grains=1; long double total_grains=1; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.