Varianta 17 / Subiectul 3 / Problema 4 |
#include <iostream.h> #include <fstream.h> int n, x, y, p; int main() { ifstream fin("numere2.txt"); fin >> n; fin >> x; n--; p = 1; while( n ) { fin >> y; if( x > y) p++; n--; } cout << p << endl; fin.close(); system("pause"); return 0; } |