|
Until you sign up you can't do much. Yes, it's free.
|
|
|
|
|
|
|
 | / / / Viewing Topic
|  |
( Lord Cat )
Wealthy Hobo
Patron
|
| Code: | #include <stdio.h> #define LOWER_LIMIT 0 #define HIGHER_LIMIT 50000 int main(void) { double fahr, cel; int limit_low = -1; int limit_high = -1; int step = -1; int max_step_size = 0; /* Read in lower, higher limit and step */ while(limit_low < (int) LOWER_LIMIT) { printf("Please give in a lower limit, limit >= %d: ", (int) LOWER_LIMIT); scanf("%d", &limit_low); } while((limit_high <= limit_low) || (limit_high > (int) HIGHER_LIMIT)) { printf("Please give in a higher limit, %d < limit <= %d: ", limit_low, (int) HIGHER_LIMIT); scanf("%d", &limit_high); } max_step_size = limit_high - limit_low; while((step <= 0) || (step > max_step_size)) { printf("Please give in a step, 0 < step >= %d: ", max_step_size); scanf("%d", &step); } /* Initialise Celsius-Variable */ cel = limit_low; /* Print the Table */ printf("\nCelsius\t\tFahrenheit"); printf("\n-------\t\t----------\n"); while(cel <= limit_high) { fahr = (9.0 * cel) / 5.0 + 32.0; printf("%f\t%f\n", cel, fahr); cel += step; } printf("\n"); return 0; } | I'm mega bored =_= LC
------- I'd tap that I have a fan!
|
|
|
|
|
 LiveWire Humor
|
|
tock
Visionary
Sustainer
|
I wrote a converter on my first day at sixth form when I was 16 ^_-
------- Squish-squash.
|
10:38 am on Nov. 9, 2009 | Joined: Oct. 2009 | Days Active: 42 Join to learn more about tock England, United Kingdom | Bisexual Female | Posts: 3,091 | Points: 9,302
|
|
| |
|
|
OneSquared
Visionary
Patron
|
------- Seperated by routine, we are all mourning in parallel form the same silent tragedies. [R.I.P Grandma 3/1/09 Love you, Miss you]
|
|
|
Marty3
Visionary
Ad Free
Support Leader
|
what language is that? The only one I know is Visual Basic 6
------- Modesty is one of my many admirable qualities. If you need to talk, even just to get something off your chest, PM me.
|
10:40 am on Nov. 9, 2009 | Joined: Feb. 2009 | Days Active: 122 Join to learn more about Marty3 Scotland, United Kingdom | Straight Male | Posts: 5,746 | Points: 8,880
|
|
| |
|
|
MustardMan661
Connoisseur
|
------- There was a time when religion ruled the world, it was called the dark ages
|
|
|
DaisyMontana
Soothsayer
|
WTF IS THAT? A VIRUS?!
------- I love Circumcised Penises SpRiNgS is my LW Husband.
|
|
|
RIMHfire
Guru
|
That's for showing us code that 9/10 of us can't understand.
|
10:41 am on Nov. 9, 2009 | Joined: Aug. 2008 | Days Active: 260 Join to learn more about RIMHfire Massachusetts, United States | Straight Female | Posts: 17,056 | Points: 20,307
|
|
| |
|
|
Mika406
Advisor
|
like html code
------- Polite girls go to heaven, naughtiness girls have heaven at land
|
|
|
|
|
|
| Looking for something else?
|
|
|
|
|
|
 | / / / Viewing Topic |  |
|