Here is the Flowgorithm code for the donations program, including comments and following the specified requirements:
flowgorithm
// Program Name: Donations_JohnSmithLab2-0.fprg
// Date: 2023-12-13
// Purpose: This program calculates donations, displays the total and hospital donation, and thanks the user.
// Initialize variables
donation1: real; // First donation amount
donation2: real; // Second donation amount
totalDonations: real; // Total of both donations
hospitalDonation: real; // Donation for children's hospital
// Prompt for first donation
write "Enter the first donation: ";
read donation1;
// Prompt for second donation
write "Enter the second donation: ";
read donation2;
// Calculate total donations
totalDonations = donation1 + donation2;
// Calculate children's hospital donation (7.5%)
hospitalDonation = totalDonations 0.075;
// Display total donations
write "The total donations are: $" & totalDonations;
// Display children's hospital donation
write "The children's hospital will receive: $" & hospitalDonation;
// Thank the user
write "Thank you for using this program!";
// End program
end;
This code should meet all the specified requirements and calculate any donation amount.