Jump to content
Clubplanet Nightlife Community

HELP ! Anyone know C programming ?????


Recommended Posts

Matt, its probably a CS assignment....

im not much on programming in C, i can do well in Java and C++, but youll use, int to define a var, and printf to print...mod is the %, and youll have to define a main and compile. for more info, take a look at lecture slides 22 and on i think...this is from one of the cs courses i took last semester..hope it helps

http://www.cc.gatech.edu/classes/AY2001/cs1322/slides/previous/spring2001/leahy/index.html

------------------

------

AIM:Turbo SC300

------

Link to comment
Share on other sites

here you go...

but you should really try a little research next time... wink.gif

#include <stdio.h>

int main()

{

int result;

float var1 = 1234.7893;

result = 15 % 4;

printf("modulus and printf quickie\n");

printf("\n15 %% 4 = %i\n", result);

printf("0....5....0....5....0");

printf("\n%12.2f\n", var1);

return 0;

}

------------------

all.jpg

AIM: thefrenchbread

YIM: thefrenchbread

Link to comment
Share on other sites

Originally posted by frenchbread:

here you go...

but you should really try a little research next time... wink.gif

#include <stdio.h>

int main()

{

int result;

float var1 = 1234.7893;

result = 15 % 4;

printf("modulus and printf quickie\n");

printf("\n15 %% 4 = %i\n", result);

printf("0....5....0....5....0");

printf("\n%12.2f\n", var1);

return 0;

}

lol...why did I just have the feeling, I would find you on that post...hahaha

------------------

an1701.gif

AIM: flying77high

Email:flying77high@yahoo.com

Link to comment
Share on other sites

HELP !

How do you write a program that :

prints and calculates 15%4 (modulus) using printf

and before the printf create a variable callled result and store 15%4 intoresult, then display it using printf

ALso I need to display the number ..

1234.7893 with 5 blank spaces and 2 digits after decimal.

Link to comment
Share on other sites

not much of a programmer but why use C for this?

This seems to be a fairly simple code that could be handled in a script... again, not a programmer but just thinking........

Matt

------------------

paint_promo2.jpg

Stones Roses - Paint Promo

AIM: mattarrundale1

[This message has been edited by matta (edited 06-11-2001).]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...