// ConsoleApplication2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iomanip> #include <iostream> #include <string> using namespace std; int main() { int n; // sportsmans number int kartai=0; // kartai - times int t=0; // how many points sportsman gets int tMin=0, tMax=0; // smallest and biggest points cout << "Parasykite kiek isviso sportininku dalyvavo" << endl; //Inputing how many sportsman played cin >> n; // while (kartai < n) { cout << "irasykite kiek tasku sportininkai gavo"; // inputing how many points sportsmans got cin >> t; if (kartai == 0) { t = tMin; t = tMax; } else { if (t > tMax) tMax = t; else if (t < tMin) tMin = t; } kartai++; } cout << "didziausias skaicius buvo" << tMax << endl; // biggest score cout << "maziausias skaicius buvo" << tMin << endl; // smallest score } So after putting all how many points sportsmens gots in while loop, program quits never putting maximum and minimum points, nor does show any cout after while
main.