comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Help me plz abt this c program
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Help me plz abt this c program [message #45598] Mon, 19 September 2005 11:50
jeyadev is currently offline  jeyadev
Messages: 78
Registered: February 1995
Member
In article <v%zXe.12$tz3.1496@news.uswest.net>,
R.G. Stockwell <no@email.please> wrote:
>> C programs:
>> 1)If the number 123.4567 is entered then the number displayed should be
>> 321.7654
>
> if number eq 123.4567 then print, '321.7654'
>
> or, if you prefer to have the vowels removed:
>
> f nmbr q 123.4567 thn prt, '321.7654'
>
> :)

I was thinking along the same lines, but you were too fast! Then, of
course, we need to have an error check. So,

if(number == 123.4567)
printf(" 321.7654 \n");
else
system("reboot");

would make is more robust against input errors.

> 2)Take name,middle name & surname in 3 strings arrays and concatenate
> three parts into single string called name.

This requires the use of string cats, objects created in the early
universe before inflation began. Most of them have no decayed to
stray cats, but there are enough around to do the job.
--

Surendar Jeyadev jeyadev1@wrc.xerox.com

The 1 in the email address is fake
Re: Help me plz abt this c program [message #45613 is a reply to message #45598] Mon, 19 September 2005 07:34 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
> C programs:
> 1)If the number 123.4567 is entered then the number displayed should be
> 321.7654

if number eq 123.4567 then print, '321.7654'

or, if you prefer to have the vowels removed:

f nmbr q 123.4567 thn prt, '321.7654'

:)
Re: Help me plz abt this c program [message #45631 is a reply to message #45613] Sun, 18 September 2005 06:58 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
closeguy writes:

> I was going through last year papers of C language of 'Master of
> computer application course' where I found these programs...and I am
> clueless about solving it..plz..if anybody could solve this, I will be
> obliged.
>
> C programs:
> 1)If the number 123.4567 is entered then the number displayed should be
> 321.7654
>
> 2)Take name,middle name & surname in 3 strings arrays and concatenate
> three parts into single string called name.

I would check with the folks over a comp.lang.homework.cheats. They
might be able to help. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL memory limitation?
Next Topic: Re: Container/Holder Destruction

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:01:05 PDT 2025

Total time taken to generate the page: 0.03184 seconds