Question: Hey guys I need help in making a simple pseudo code and flowchart for a code that I made. NOTE: I ONLY NEED THE PSEUDO
Hey guys I need help in making a simple pseudo code and flowchart for a code that I made.
NOTE: I ONLY NEED THE PSEUDO CODE AND FLOW CHART. PLEASE SEND COMPUTERIZED FORM.
The activity is House Sign
Mark Daniels is a carpenter who creates personalized house signs. He wants an application to compute the price of any sign a customer orders, based on the following factors:
- The minimum charge for all signs is $30.
- If the sign is made of oak, add $15. No charge is added for pine.
- The first six letters or numbers are included in the minimum charge; there is a $3 charge for each additional character.
- Black or white characters are included in the minimum charge; there is an additional $12 charge for gold-leaf lettering.
Design a program that accepts data for an order number, customer name, wood type, number of characters, and color of characters. Display all the entered data and the final price for the sign.
Here's the code I created
Source Code:
c code:
#include#include int main() { //Name input int orderNum; char Name[100]; printf("Welcome to Mark Daniel Crafts!"); printf(" Enter an Order number: "); scanf("%d",&orderNum); printf("Customer name: "); scanf(" %[^ ]N", Name); //variable declaration int characters; int woodFees, charFees, colorFees; char woodType [10]; char colorType [29]; int min_charge = 30; // wood printf(" Minimum charge is $%d",min_charge); printf(" What type of wood do you prefer? \'Pine' or \'Oak\': "); scanf(" %[^ ]N", woodType); // if the woodType is OAK add 15 to the woodfee if(strcmp(woodType, "Oak") == 0){ woodFees = 15; }else{ woodFees = 0; } //characters printf(" How many characters should be printed? Please enter a number: "); printf(" (There is a $3 charge for every character after the first o.)"); scanf("%d", &characters); // if the characters is greater than 6 if(characters > 6) { // adding 3 to each character charFees = (characters - 6) * 3; } //color variation printf(" Do you want in Black & White or in Gold-Leaf Lettering?"); printf(" Enter either 'Black & White\' or Gold-Leaf\'."); printf(" There is a $12 charge for Gold-Leaf Lettering.)"); scanf("%s", colorType); if(strcmp(colorType, "Gold-Leaf") == 0) { colorFees = 12; } // calculate the final price by adding the other charges int finalPrice = min_charge + woodFees + charFees + colorFees; // Display the result printf(" \t******* REPORT *****"); printf(" \tOrder Number\t\t%d",orderNum); printf(" \tCustomer Name\t\t%s",Name); printf(" \tMinimum Charge\t\t%d",min_charge); printf(" \tWood Type\t\t%s",woodType); printf(" \tNo.of Characters\t%d",characters); printf(" \tCharacters Color\t%s",colorType); printf(" \t--------------------------------"); printf(" \tFinal Price\t\t%d",finalPrice); return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
