Journal #8817

Posted 6 years ago2017-06-13 10:20:35 UTC
Coded a forestry specific programme, mainly because back in September I specified that I'll make something like this in my scholarship application. It works well for my crude coding, but still looks and does shit. At least it does just what it was supposed to do...

Here's a link for anyone willing to try it (warning: it's a win32 console application in polish language): ForestR

And here's the clean, readable and simple, yet crude code:

#include <cstdio>
#include <iostream>
#include <string>
#include <fstream>
using namespace std;

int main()
{
int MCh = 0;
int MsCh = 0;
float Pow = 0;
string Krain;
string RDLP;
string TSL;
string GTD;
string Rb;
ofstream out("Projekt.txt");
do
{
	cout << "ForestR - Program do projektowania sztucznego odnowienia lasu." << endl;
	cout << "[1] Rozpocznij projekt" << endl;
	cout << "[2] Wyjscie" << endl;
	cin >> MCh;
	switch (MCh)
	{
	case 1:
		cout << "Podaj kraine przyrodniczo-lesna" << endl;
		cin >> Krain;
		cout << "Podaj RDLP:" << endl;
		cin >> RDLP;
		cout << "Podaj TSL:" << endl;
		cin >> TSL;
		cout << "Podaj GTD:" << endl;
		cin >> GTD;
		cout << "Podaj powierzchnie:" << endl;
		cin >> Pow;
		cout << "Podaj rebnie:" << endl;
		cin >> Rb;

		cout << "Kraina przyrodniczo lesna:" << Krain << endl;
		cout << "RDLP:" << RDLP << endl;
		cout << "TSL:" << TSL << endl;
		cout << "GTD:" << GTD << endl;
		cout << "Powierzchnia dzialki:" << Pow << endl;
		cout << "Rebnia:" << Rb << endl;
		cout << "Zapisywanie..." << endl;
		break;
	default:
		break;
	}
} while (MCh != 2);
out << Krain;
out << RDLP;
out << TSL;
out << GTD;
out << Pow;
out << Rb;
out.close();
return 0;
}

That cstdio is most probably useless here, but I don't care.

6 Comments

Commented 6 years ago2017-06-13 15:36:12 UTC Comment #67859
... what exactly are you trying to do? It's not translated.
Commented 6 years ago2017-06-13 18:27:18 UTC Comment #67860
He's obviously trying to Kraina przodnzco lesna!
Commented 6 years ago2017-06-13 18:43:15 UTC Comment #67863
Despite Polish being a slavic language I can barely understand what is it all about.
Commented 6 years ago2017-06-13 18:46:58 UTC Comment #67862
Despite Polish being a Slavic language I will never know, I found one word which could mean something in Bosnian: "Zapisywanie".

"Zapisivanje" means "writing down" in Bosnian.
"Zapisati" = "To write down"

Also, "podaj" means "give" in south-Slavic. xD
I kind of found it funny when I heard Russians saying "davaj" because "davaj" also means "give" in my language.
Commented 6 years ago2017-06-14 00:15:15 UTC Comment #67864
I guess you can translate "Kraina" as "Country" or "Land".
I expected polish to be simplier.
Commented 6 years ago2017-06-14 05:57:56 UTC Comment #67861
It gets only harder the more you know about it... And that's without polish characters, because those can't be used in console applications.

Text doesn't really matter, you can change it to anything you want and it still would ask your for typing into variables then write it to file.

Here's a translation for those text bits:

ForestR - forest renewal software.

Rozpocznij projekt - start project
Wyjście - quit

Kraina przyrodniczo-leśna: Poland is split into 8 regions in which there are differences in DNA of plants, according to conditions in each of regions.

RDLP - regional management of states forest

TSL - forest habitat type

GDT - what you'd like to plant on the area. Written like this: 7So3Sw means that 70% of area would be taken by pine, 30% by spruce

Powierzchnia - area

Rębnia - the way tree cutting is planned. Like, Ia is a full clear cut, and it's used only during ecological disasters. There are much more categories of these.

Podaj means give, can be used as type in as well. Zapisywanie means saving

You must log in to post a comment. You can login or register a new account.