Wednesday, 24 October 2012

Program Of Ten Random Numbers


#include <stdio.h>
#include <iostream.h>


void main()

{

int i,j,k,l,list[1000];

FILE *fp;

char any[8];

cout << "Enter a file name\n";

cin >> any;

fp = fopen(any,"wb");
    
for(j=0;j<50;j++)

    {
     
  for(i=0;i<200;i++)
    
   {
 
 k = rand() % RAND_MAX;
  

       }

    }


    i = 0;
   

    {
 
 list[i] = l;

 i = i + 1;

    }

fclose(fp);

for (i=0;i<50;i++)
    
cout << list[i] << '\n';



}



No comments:

Post a Comment