Untitled
unknown
plain_text
5 months ago
674 B
4
Indexable
#include <iostream> #include <fstream> using namespace std; void read (int & numberOfLines, int numbers [10]); int main() { int numberOfLines, numbers[10]; int N = 11; read(numberOfLines, numbers); for(int i = 0; i < 10; i++) { // cout << numbers[i] << endl; } for(int i = 0; i < 10; i++) { int skaiciai = numbers[i]; if(skaiciai > N) { cout << numbers[i] << endl; } } return 0; } void read (int & numberOfLines, int numbers [10]) { ifstream fd ("duom.txt"); int numberOfLine; fd >> numberOfLines; for(int i = 0; i < numberOfLines; i++) { fd >> numbers[i]; } }
Editor is loading...
Leave a Comment