C Program in SUN 3/50

C Program in SUN 3/50

Post by Sanjoy Mukherj » Sat, 19 Jan 1991 05:55:24



 thanx, for all your replies to my original query.

I took the definition of ceiling function literally and didnot check
the manual properly. Sorry for the oversight.

sanjoy

 
 
 

1. C program in SUN 3/50

hi,
        I have been bumped by the following piece of code.
The last argument of the printf statement is giving wrong answer.
Any pointers ????
Please e-mail your reply, because I donot read these newsgroups often
thanx in advance

--------------------------------------------------------------------------
#include <math.h>
#include <stdio.h>

int a,b,c,d,g,e;

main(argc,argv)
int argc;
char *argv[];
{
a = atoi(argv[1]); b= atoi(argv[2]); c=atoi(argv[3]);
d = ceil(((double)a)/((double)b));
g = a*b;
printf("\n%d %d %d %d %d %d %d \n",a,b,c,d,d*c,g,ceil(((double)a)/((double)b))+g);

---------------------------------------------------
Compiling command : cc test.c -lm
----------------------------------
Run : a.out 1 2 3
------------------------
Output: 1 2 3 1 3 2 1074266112
--------------------------

2. : How to group input argument

3. Sun 3/50 can't be NFS mounted by non-Sun Unix host

4. NEW USER QUESTION PLEASE ANSWER

5. pci ultra scsi cable to 50 pin scsi ii (vhdc ro 50 pin)

6. Getting news over a slip connection

7. Make Your H/50 & F/50 haul ASS!

8. NexGen, E-net cards and ???

9. NetBSD on Sun 3/50

10. SLIP/PPP on a Sun 3/50 running 4.1.1

11. sun 3/50 as X terminal

12. NetBSD on a Sun 3/50??

13. sun 3/50 on linux box: Xsun fails