MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / main

Function main

Lab_06/Source.cpp:207–481  ·  view source on GitHub ↗

////////////////////////////////***STARTING POINT***////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

205
206/////////////////////////////////////***STARTING POINT***////////////////////////////////////////////////////
207int main()
208{
209 system("color 3E");
210 int numberforoperation = 0;
211 double radius1;
212 double sideA, sideB;
213 double sidetriangleA, sidetriangleB, sidetriangleC;
214 float sidesquare;
215 double n1, n2, n3;
216
217 for (int l = 0; l < 120; l++)
218 {
219 cout << "=";
220 }
221 cout << endl;
222 cout << "\t\t\t\t\tHello! Welcome to the main menu.\n";
223 cout << "\t\t WARNING!!! Enter only numbers!!! And the 'y/n' when you will be asked!\n";
224 for (int l = 0; l < 120; l++)
225 {
226 cout << "=";
227 }
228 cout << endl;
229 cout << "\t[1] Area of Geometrical Figures.\n";
230 cout << "\t[2] Circumference of geometrical figures.\n";
231 cout << "\t[3] Find the largest number.\n";
232 cout << "\t[4] finding the largest number with function template.\n";
233 cout << "\t[5] EXIT\n";
234 cout << endl;
235b:
236 cout << " Please enter the number of operation you would like to execute: ";
237 cin >> numberforoperation;
238 if (numberforoperation > 0 && numberforoperation < 6)
239 {
240 system("cls");
241 switch (numberforoperation)
242 {
243 case 1: // first11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
244 first();
245 int firstfirst;
246 f:
247 cout << " Choose one figure: ";
248 cin >> firstfirst;
249 if (firstfirst > 0 && firstfirst < 6)
250 {
251 system("cls"); // ends the main menu
252 switch (firstfirst) // firstfirst
253 {
254 system("cls"); // ends the main menu
255 case 1:
256 cout << "\t\t\t\t***CIRCLE***\n";
257 a:
258 cout << "Enter the radius of the circle: ";
259 cin >> radius1;
260 if (radius1 > 0)
261 {
262 area(radius1);
263 first();
264 goto f;

Callers

nothing calls this directly

Calls 6

firstFunction · 0.85
secondFunction · 0.85
circumferenceFunction · 0.85
thirdFunction · 0.85
findlargestFunction · 0.85
areaFunction · 0.70

Tested by

no test coverage detected