is there an example of the raptor flowchart for this? https://www.chegg.com/home
ID: 3597755 • Letter: I
Question
is there an example of the raptor flowchart for this?
https://www.chegg.com/homework-help/questions-and-answers/create-raptor-flowchart-calculates-amount-person-would-earn-period-time-salary-one-penny-f-q19171126?trackid=01f5ed01&strackid=4275aeee&ii=4
The link is for help on making a rator flowchart. But I dont see any?? Below is the problem / assignment.
Create a Raptor Flowchart that calculates the amount a person would earn over a period of time if his or her salary were one penny the first day, two pennies the second day, and so on doubling each day.
Your program should: 1. Request the number of days. 2. Display a table showing what the salary is for each day 3. Display the total pay
Explanation / Answer
#include <iostream>
using namespace std;
int main()
{
int days;
cout<<"Enter The number of days you have worked this month:"<<endl;
cin>>days;
if(days < 1 || days > 31)
{ cout<<"Only enter a number between 1 and 31"<<endl;
return 0;}
int num = 1;
for(int i = 1; i < days; i++){
num = num * 2;
}
cout << "Number of days: "<<days<<endl<<"Number pennies paid per day: "<<num;
cout << " ";
char wait;
cin>>wait;
return 0;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.