Generation

generate functionFri, 14 Apr 2023

ordenar la información de un archivo segun los numeros que entran

#include <iostream> #include <fstream> using namespace std; int main () { int a, b, c; ifstream myfile ("example.txt"); if (myfile.is_open()) { while (myfile>>a >> b >> c) { cout << a << " " << b << " " << c << endl; } myfile.close(); } else cout << "Unable to open file"; return 0; }

Questions about programming?Chat with your personal AI assistant