I have just started a basic class in programming and I am totally lost. Can someone help me out? I have to write pseudocodes and create flowcharts and don't have a clue. I need help.
Create flowcharts and pseudo-code for the following problems:

1. You're trying to figure out where to go on vacation. Here are the different scenarios: First, check how many vacation days you have left. If you have less than 2 days, you will stay at home. If you have between 2 and 4 days, you will go to Asheville. If you have more than 4 days, you check your budget. If your budget is greater than $1200, you will go to Aruba. Otherwise, if it's greater than $800, you will go to Miami. If it's not greater than $800, you will go to Orlando.

2. You need to calculate the discount that your customers receive based on the value of their order. If the total amount ordered is less than $20, no discount will be given. If the total amount is between $20 and $50, a discount of 5% will be given. If the total amount is greater than $50 and less than $100, a discount of 10% will be given. If the total amount is $100 or more, a premium customer receives 20% discount and a regular customer receives 15% discount.

Can anyone help me?

hi jaguar.........
its not possible to show the flowchart
but bfore asking for pseudocodes
u shud have shown us what have u
tried by urself

BTW here goes the ist one am writing
it in c.......

#include <stdio.h>
# include<conio.h>
int main()
{
int i,bud; //i=no. of days,bud=budget
printf("enter the no. of days");
scanf("%d",i);
printf("\n enter the budget");
scanf("%d",bud);

if(i<2)
{
    printf("");
}
else
{
   if(i<4)
   {
    printf("");
   }
    else
    {
      if(bud>1200)
     {
       printf("");
     }
      else
       {
            if (bud>800)
             {   printf("");}
            else
              {   printf("");}
       }
    }
}

whoo.............that was
a compex web of if-else

do the second one in the same lines
and check the braces

frank

I have just started a basic class in programming and I am totally lost. Can someone help me out? I have to write pseudocodes and create flowcharts and don't have a clue. I need help.
Create flowcharts and pseudo-code for the following problems:

1. You're trying to figure out where to go on vacation. Here are the different scenarios: First, check how many vacation days you have left. If you have less than 2 days, you will stay at home. If you have between 2 and 4 days, you will go to Asheville. If you have more than 4 days, you check your budget. If your budget is greater than $1200, you will go to Aruba. Otherwise, if it's greater than $800, you will go to Miami. If it's not greater than $800, you will go to Orlando.

2. You need to calculate the discount that your customers receive based on the value of their order. If the total amount ordered is less than $20, no discount will be given. If the total amount is between $20 and $50, a discount of 5% will be given. If the total amount is greater than $50 and less than $100, a discount of 10% will be given. If the total amount is $100 or more, a premium customer receives 20% discount and a regular customer receives 15% discount.

Hope this helps! it did not stay in the right format you will have to indent some of the lines but I'm sure you know how to do that.

Psuedocode
start
declare variables
VacationDays
BudgetNeeded
print “How many days?
read vacationDays
print “budgetNeeded
read budget
if vacationDays < 2 then
print “Stay at Home
else
if vacationDays > = 2 and < = 4 then
print “Go to Asheville
else
if budgetNeeded >1200 then
print “Go to Aruba
else
if budgetNeeded >800 then
print “Go to Miami
else
print “Go to Orlando
endif
endif
endif
endif
stop

I have just started a basic class in programming and I am totally lost. Can someone help me out? I have to write pseudocodes and create flowcharts and don't have a clue. I need help.
Create flowcharts and pseudo-code for the following problems:

1. You're trying to figure out where to go on vacation. Here are the different scenarios: First, check how many vacation days you have left. If you have less than 2 days, you will stay at home. If you have between 2 and 4 days, you will go to Asheville. If you have more than 4 days, you check your budget. If your budget is greater than $1200, you will go to Aruba. Otherwise, if it's greater than $800, you will go to Miami. If it's not greater than $800, you will go to Orlando.

2. You need to calculate the discount that your customers receive based on the value of their order. If the total amount ordered is less than $20, no discount will be given. If the total amount is between $20 and $50, a discount of 5% will be given. If the total amount is greater than $50 and less than $100, a discount of 10% will be given. If the total amount is $100 or more, a premium customer receives 20% discount and a regular customer receives 15% discount.

Here is # 1
Psuedocode
start
declare variables
VacationDays
BudgetNeeded
print “How many days?
read vacationDays
print “budgetNeeded
read budget
if vacationDays < 2 then
print “Stay at Home
else
if vacationDays > = 2 and < = 4 then
print “Go to Asheville
else
if budgetNeeded >1200 then
print “Go to Aruba
else
if budgetNeeded >800 then
print “Go to Miami
else
print “Go to Orlando
endif
endif
endif
endif
stop

Here is #2
Psuedocode

start
declare variables
num cost, discount
char customerType
printenter cost
get cost
If cost <20 then
discount = 0
else
If cost < 50 then
discount = cost * .05
else
if cost < 100 then
discount = cost * .1
else
print “is customer regular or premium press R for regular press P for premium
get customerType
if “ customerType = “R then
discount = cost *.15
else
discount = cost * .20
endif
endif
endif
endif
print “customer discount is discount
stop

Psuedocode
start
declare variables
VacationDays
BudgetNeeded
print “How many days?
read vacationDays
print “budgetNeeded
read budget
if vacationDays < 2 then
print “Stay at Home
else
if vacationDays > = 2 and < = 4 then
print “Go to Asheville
else
if budgetNeeded >1200 then
print “Go to Aruba
else
if budgetNeeded >800 then
print “Go to Miami
else
print “Go to Orlando
endif
endif
endif
endif
stop

Here is #2

Psuedocode

start
declare variables
num cost, discount
char customerType
printenter cost
get cost
If cost <20 then
discount = 0
else
If cost < 50 then
discount = cost * .05
else
if cost < 100 then
discount = cost * .1
else
print “is customer regular or premium press R for regular press P for premium
get customerType
if “ customerType = “R then
discount = cost *.15
else
discount = cost * .20
endif
endif
endif
endif
print “customer discount is discount
stop

Developing a flowchart and its pseudocode

can any one help me plz . i want to know that whai is the pseudo code of alll prime numbers from 400 t0 1ooo[/B]

can you create a flowchart and pseudo code that the output is the sum of the first 10 number ?

print 55

however, when a vehicle entes a distanced-based road, the computer stores the vehicle's point of entry, and calculates and assesses when the vehicle entered and exited the toll facility. transactions are performed while the vehicle is within 40 meters of the antenna's reach.

based on this scenario, use PSEUDO CODE to write an algorithm

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.