Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Cotton Farm v: (0.0.0.002)
#include <iostream> //Basic Library #include <fstream> //Library that allows reading or writting in files #include <string> //Library to use string function #include <conio.h> #include <windows.h> using namespace std; //Setting up the cout<< and cin>> functions using namespace std; //Setting up the cout<< and cin>> functions /* Curent Version:(Final/Beta/Alpha/Development Vesion): -[[0.0.0.002]]- ----------------------------------------------------------------------- ------------------------------------------------------------------- -------------------------- · COTTON FARM · ---------------------------- ------------------------------------------------------------------- CREATED BY: - Snadro 420 & Romandelg Computing® (by XCode® 2017) - WORKS: YES Things to Change: Feedback from last test (worked? Where is the mistake? What shoudld we try?): Other comments: ----------------------------------------------------------------------- ------------------------------------------------------------------- */ void growing_stage (float &growing_progress, int &w, int &f, int &h, int &time, int &w_grade, char &input) { int i = 0; system ("cls"); cout << " Time: " << time / 2 << "\n"; cout << " _/|**·····**|**·····**|\_ " cout << "W ="; do { cout << "-"; i ++; } while (i < w); if (kbhit()) { input = getch(); goto l; } else { goto x; } l: switch (input) { case 'w': w = w + 2; break; case 'f': break; case 'h': break; default: cout<< "INCORRECT KEY"; break; } x: cout << "\n________________________\n"; } void growing_clock (float &growing_progress, int &w, int &f, int &h, int &time, int &w_grade, char &input) { if (time<360) { time++; w = w - 1; f = f - 1; h = h - 1; Sleep (500); if (w > 19){ w = 20; w_grade = 0; } if (w < 1){ w = 1; w_grade = 0; } growing_stage(growing_progress, w, f, h, time, w_grade, input); } else growing_progress = 100; } int main(){ float growing_progress = 0; int time = 0, w = 10, w_grade = 10; char input; //GROWING STAGE do{ growing_clock (growing_progress, w, , f, h, time, w_grade, input); } while (growing_progress < 99); return 0; }
run
|
edit
|
history
|
help
0
Octavia
1. Basics: primitive data types
różne wersje parsowania kwoty i daty (CultureInfo)
Shalini_CSG_CodeTest
Extract all possible substrings from a string
123.0
bst - lot of methods
Ccc
combof123usingloop
1