You are on page 1of 4

#include <iostream>

#include <cmath>

#include <stdio.h>

using namespace std;

int main()

printf ("Proposed Program:Seaweeds Planting and transplanting Scheduling\nProponents:Jaira Faith


D. Montano and Nessa Valmorie and Joey Canalita\n:");

float a;

float b; /*Number of lines*/

float c; /*Weight of Seaweeds*/

float p; /*Total Seaweeds Planted*/

float r = .04; /*Growth rate per day*/

int harvest;

int number_of_lines;

int day;

float Seaweeds_harvested_kg;

float seaweeds_day_old;

float Total_Seaweeds_after_45days;

float Remaining_seaweeds;

int transplant;

float New_Total_Line_of_Seaweeds;

float Transplanted_Seaweeds;

float Transplanted_Seaweeds_per_line;

float Total_transplanted;
{

printf ("Kilogram of Seaweeds:");

scanf ("%f", &p);

for (int day = 1; day<= 45; day ++)

a=p *pow(1+r, day);

b=(p/25);

c=a/b;

cout << day <<"----"<< a << endl;

cout << day <<"----"<< b << endl;

cout << day <<"----"<< c << endl;

printf("Do you want to harvest?(1) yes (2) no :");

scanf ("%d", &harvest);

if (harvest == 2)

printf ("Alright then Let's wait for harvest time!\n:");

}
{

if (harvest == 1)

printf("Number of lines:");

scanf("%d", &number_of_lines);

printf("Seaweeds Day old:");

scanf ("%d", &day);

seaweeds_day_old = (p/20)*pow(1+r, day);

Seaweeds_harvested_kg = number_of_lines * seaweeds_day_old;

printf ("Total seaweed harvested in kilo = %.2f\n", Seaweeds_harvested_kg);

Remaining_seaweeds = p*pow(1+r, day) - Seaweeds_harvested_kg;

printf("Remaining seaweeds = %.2f\n", Remaining_seaweeds);

Total_Seaweeds_after_45days = a - Seaweeds_harvested_kg;

printf ("Expected harvest after 45 days = %.2f\n", Total_Seaweeds_after_45days);

printf("Do you want to transplant? (1) Yes (2) No :");

scanf("%d", &transplant);

if (transplant == 1)

New_Total_Line_of_Seaweeds = (Seaweeds_harvested_kg/25)+(b-number_of_lines);

printf("New total line of seaweeds = %2.f\n", New_Total_Line_of_Seaweeds);

}
{

for (int day = 1; day<= 45; day ++)

Transplanted_Seaweeds = Seaweeds_harvested_kg *pow(1+r, day);

Transplanted_Seaweeds_per_line =(Seaweeds_harvested_kg/25);

Total_transplanted = Transplanted_Seaweeds/Transplanted_Seaweeds_per_line;

cout << day <<"----"<< Transplanted_Seaweeds << endl;

cout << day <<"----"<< Transplanted_Seaweeds_per_line << endl;

cout << day <<"----"<< Total_transplanted << endl;

}UhhhhddeRSS_@z

You might also like