LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 490 users online 222652 members 1456 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
iGalaxy
Peeves: Discrimination, intolerance, being int...
Mood: Pensive
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
5 online / 20 MPM
Fresh Topics
  LiveWire / Teen Forums / Deep Thoughts & Random Musings / Viewing Topic

I'm bored an wrote this today..
Replies: 8Last Post Nov. 9 10:41am by Lord Cat
Welcome to LiveWire!
We're Stronger Together.
Join the Community
Single page for this topic Email Print Favorite
( Lord Cat )


Wealthy Hobo

Patron
Reply
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!


10:38 am on Nov. 9, 2009 | Joined: Sep. 2008 | Days Active: 210
Join to learn more about Lord Cat Ireland | Label Free Male | Posts: 3,463 | Points: 5,547
LiveWire Humor
tock


Visionary

Sustainer
Reply
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
Reply


-------
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]

10:39 am on Nov. 9, 2009 | Joined: Oct. 2008 | Days Active: 174
Join to learn more about OneSquared Florida, United States | GLBT Ally Female | Posts: 6,443 | Points: 9,958
Marty3


Visionary

Ad Free
Support Leader
Reply
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
Reply


-------
There was a time when religion ruled the world, it was called the dark ages

10:40 am on Nov. 9, 2009 | Joined: Oct. 2007 | Days Active: 126
Join to learn more about MustardMan661 California, United States | Bisexual Male | Posts: 4,386 | Points: 6,226
DaisyMontana


Soothsayer
Reply
WTF IS THAT? A VIRUS?!

-------
I love Circumcised Penises
SpRiNgS is my LW Husband.

10:40 am on Nov. 9, 2009 | Joined: Mar. 2009 | Days Active: 93
Join to learn more about DaisyMontana New York, United States | Bi-curious Female | Posts: 9,355 | Points: 10,407
RIMHfire


Guru
Reply
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
Reply
like html code

-------
Polite girls go to heaven, naughtiness girls have heaven at land

10:41 am on Nov. 9, 2009 | Joined: June 2009 | Days Active: 30
Join to learn more about Mika406 Poland | Questioning Female | Posts: 391 | Points: 698
( Lord Cat )


Wealthy Hobo

Patron
Reply
Quote: from DaisyMontana at 6:40 pm on Nov. 9, 2009

WTF IS THAT? A VIRUS?!

No....it converts Celsius into Fahrenheit
boring i know, but it reflects on how bored i am  

-------
I'd tap that
I have a fan!


10:41 am on Nov. 9, 2009 | Joined: Sep. 2008 | Days Active: 210
Join to learn more about Lord Cat Ireland | Label Free Male | Posts: 3,463 | Points: 5,547
Single page for this topic Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Teen Forums / Deep Thoughts & Random Musings / Viewing Topic