I installed Microsoft Visual C ++ 2010 Express on my netbook, I bought a tutorial on c ++,
I have printed this program from him
#include <iostream> using namespace std ; int main ( ) { // ΠΎΠ±ΡΡΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΈΠ½ΠΈΡΠΈΠ°Π»ΠΈΠ·Π°ΡΠΈΡ ΠΌΠ°ΡΡΠΈΠ²Π° array int array [ ] = { 5, -10, 123, -7, 25, -3, -77, 1, 7, 3 } ; // Π²ΡΡΠΈΡΠ»Π΅Π½ΠΈΠ΅ size β ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²Π° ΡΠ»Π΅ΠΌΠ΅Π½ΡΠΎΠ² Π² ΠΌΠ°ΡΡΠΈΠ²Π΅ int size = sizeof ( array ) / sizeof ( array [ 0 ] ) ; // ΠΏΡΠ΅Π΄ΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅, ΡΡΠΎ ΠΌΠΈΠ½ΠΈΠΌΠ°Π»ΡΠ½ΡΠΉ ΡΠ»Π΅ΠΌΠ΅Π½Ρ ΠΈΠΌΠ΅Π΅Ρ ΠΈΠ½Π΄Π΅ΠΊΡ 0 int jMin = 0 ; // ΡΠΈΠΊΠ» ΠΏΡΠΎΠ²Π΅ΡΠΊΠΈ ΡΠ»Π΅ΠΌΠ΅Π½ΡΠΎΠ² ΠΌΠ°ΡΡΠΈΠ²Π° for ( int j = 1; j < size; j++ ) if ( array [ j ] < array [ jMin ] ) jMin = j ; // Π²ΡΠ²ΠΎΠ΄ ΠΌΠ°ΡΡΠΈΠ²Π° cout << "Elements of array\n" ; for ( int j = 0; j < size; j++ ) cout << array [ j ] << '\t' ; // Π²ΡΠ²ΠΎΠ΄ ΠΌΠΈΠ½ΠΈΠΌΠ°Π»ΡΠ½ΠΎΠ³ΠΎ Π·Π½Π°ΡΠ΅Π½ΠΈΡ array [ jMin ] cout << "\nMinimum = " << array [ jMin ] << endl ; exit (0) ; }
I compile it, the console appears and quickly disappears, do not tell me what the problem is?