Path: utzoo!attcan!uunet!seismo!ukma!rex!samsung!umich!caen!hellgate.utah.edu!peruvian.utah.edu!msmith From: msmith%peruvian.utah.edu@cs.utah.edu (Matthew Smith) Newsgroups: comp.lang.c Subject: Re: random letter generator Message-ID: <1990Oct19.154904.9020@hellgate.utah.edu> Date: 19 Oct 90 21:49:04 GMT References: <1990Oct17.120817.4636@swbatl.sbc.com> Organization: University of Utah CS Dept Lines: 15 In article <1990Oct17.120817.4636@swbatl.sbc.com> uucigj@swbatl.sbc.com writes: >I am in need of a function that will return a random captial letter >(A-Z). This seems like an easy one, but it is eluding me. Any help? > >Please email since I don't get a chance to read this group that often. > > Gregg Jensen How about generating a random number between 0 and 25, and adding 65 to it. That would give you a range of 65 to 90, or ascii codes for A and Z. num=25*random()+65; Matt Smith