User talk:Harishdvellore

Welcome!

Hello,, and welcome to Wikipedia! I hope you like the place and decide to stay. Unfortunately, one or more of the pages you created may not conform to some of Wikipedia's guidelines for page creation, and may soon be deleted.

There's a page about creating articles you may want to read called Your first article. If you are stuck, and looking for help, please come to the New contributors' help page, where experienced Wikipedians can answer any queries you have! Or, you can just type   on this page, and someone will show up shortly to answer your questions. Here are a few other good links for newcomers: I hope you enjoy editing here and being a Wikipedian! Please sign your name on talk pages using four tildes ( ~ ); this will automatically produce your name and the date. If you have any questions, check out Where to ask a question or ask me on. Again, welcome! Favonian (talk) 10:30, 6 February 2010 (UTC)
 * Your first article
 * Biographies of living persons
 * How to write a great article
 * The five pillars of Wikipedia
 * Help pages
 * Tutorial

LOTTERY PROCESS SCHEDULING IN C
/************************************************************************ * * Purpose: Simulation of lottery process scheduling. * Author: D.Harish * Date: 18-04-10 * Description: Any 6 random numbers from 1 to 49 are displayed. *             Duplicates are removed and the results sorted. * ************************************************************************/

/********** Preprocessor ***********************************************/
 * 1) include

/********** Global variables ***********************************************/ int n,tic_cou[25],ptic[250];

/**********Functions ***********************************************/ int say_proc_name(int find_proc_name) {	int i,k,ret_urn,inipos=0,finpos=0; for(i=0;i<n;i++) {		find_proc_name=find_proc_name-tic_cou[i]; inipos=inipos+tic_cou[i]; if(find_proc_name<0) {			finpos=inipos; inipos=inipos-tic_cou[i]; ret_urn =i; //printf("inipos=%dfinpos=%d",inipos,finpos); break; }	}	/*Withdraw all tickets*/ for(i=inipos;i<finpos;i++) {		ptic[i]=0;/*printf("ptic[%d]=%d",i,ptic[i]);*/ }	return (ret_urn); } int main {	int k=0,ptime[25],i,j,d=0; char name[25][25]; int dup,count2,count=0,inicount; int lotto,flag,lucky_proc; float avg; clrscr; printf ("Enter the no. of process: \t"); scanf ("%d",&n); for(i=0;i<n;i++) {		printf("enter the name for processes: \t"); printf("%d \t",i+1); scanf("%s",name[i]); }	printf("\n \n"); /* 5 4 7 4 9 c a e b d*/ for(i=0;i<n;i++) {		printf("enter the process time: \t"); printf("%s \t",name[i]); scanf("%d",&ptime[i]); }	printf("\n \n"); for(i=0;i 0 ) k--; }	}	printf("\n \n"); //for(i=0;i<count;i++){printf("\n%d",ptic[i]);} for(i=0;i<n;i++) {		lotto=(rand%249)+1; //printf("\nlotto=%d",lotto); flag=0; for(k=0;k<count;k++) {			if(lotto==ptic[k]) {				lucky_proc=say_proc_name(k); //printf("\n%s",name[lucky_proc]); printf("process %s from %d to %d \n",name[lucky_proc],d,d+ptime[lucky_proc]); d+=ptime[lucky_proc]; flag=0; //printf("\nlotto=%dlucky_proc=%dproc_name%s",lotto,lucky_proc,name[lucky_proc]); break; }			else {				flag=1; }		}		if(flag==1) i--; }

getch; return 0; }