Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Feasibility Check of Pseudocode.docx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Chargement dans…3
×

Consultez-les par la suite

1 sur 2 Publicité

Plus De Contenu Connexe

Plus récents (20)

Publicité

Feasibility Check of Pseudocode.docx

  1. 1. Feasibility Check of Pseudocode #include <stdio.h> #include <time.h> #define MIN_TEMP 85 // Minimum temperature for brewing tea #define MAX_TEMP 95 // Maximum temperature for brewing tea int main() { // Get user input for type of tea, strength of brew, and brewing time int teaType, brewStrength, brewTime; printf("Enter type of tea (1 for green, 2 for black, 3 for oolong, 4 for white): "); scanf("%d", &teaType); printf("Enter strength of brew (1 for light, 2 for medium, 3 for strong): "); scanf("%d", &brewStrength); printf("Enter brewing time in seconds: "); scanf("%d", &brewTime); // Set temperature based on type of tea int temp; switch (teaType) { case 1: temp = MIN_TEMP + 2; break; // Green tea case 2: temp = MIN_TEMP + 3; break; // Black tea case 3: temp = MIN_TEMP + 4; break; // Oolong tea case 4: temp = MIN_TEMP + 5; break; // White tea default: temp = MIN_TEMP + 3; break; // Default to black tea } // Heat water to desired temperature heatWater(temp); // Add tea leaves to brewing chamber addTeaLeaves();
  2. 2. // Start brewing process startBrew(brewTime); // Dispense tea into cup dispenseTea(); // Display brewing status printf("Brewing complete! Enjoy your %d strength cup of ", brewStrength); switch (teaType) { case 1: printf("green"); break; case 2: printf("black"); break; case 3: printf("oolong"); break; case 4: printf("white"); break; } printf(" tea.n"); return 0; }

×