All pastes #441347 Raw Edit

aad

public cpp v1 · immutable
·published 2007-04-15 17:09 UTC
rendered paste body
#include <fstream>#include <iostream>#include <conio+.h>#include <svtecken.h>#include <time.h>using namespace std;void slumpa_tal(int tal[], int n);void skriv_ut(int tal[], int n);int main(){    teckenbyt();    int slumpvektor[10];    const int antal=10;    slumpa_tal(slumpvektor,antal);    skriv_ut(slumpvektor,antal);    system("pause");    return 0;    }void slumpa_tal(int tal[], int n){     srand(time(NULL));      for(int i = 0; i <n; i++)           tal[i]=rand()%25;}     void skriv_ut(int tal[], int n){     ofstream fout ("fil.txt");    for(int i=0; i<n; i++) fout << tal[i] << " ";fout << endl; fout.close();}