Submitted scripts and programs
Forum rules
Your own work only.
-
machinebacon
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
-
Contact:
Unread post
by machinebacon » Fri Jan 29, 2016 7:07 pm
Again nothing fancy, but you can change it to fit your needs. As it is now, it converts CUR1 (cur1) to CUR2 (cur2) at an exchange rate of 0.140 (exc)
Code: Select all
#include<stdio.h>
#include<stdlib.h>
#include<err.h>
float cur1,cur2,exc;
int main (int argc, char *argv[]) {
if (argc != 2) {
fprintf(stderr, "Usage: Enter amount in CUR1\n");
exit(1);
}
exc = 0.140;
cur1 = atof(argv[1]);
cur2 = cur1 * exc;
printf("%.2f CUR1 is %.2f CUR2\n", cur1, cur2);
return 0;
}
..gnutella..
-
Theo
- CLIt Licker
- Posts: 394
- Joined: Wed Nov 11, 2015 10:19 pm
- Location: Nieuw-Buinen, Netherlands
Unread post
by Theo » Fri Jan 29, 2016 10:09 pm
It makes me a bit sad, those old and good times...
Back in the day I changed my beloved Dutch 'gulden' to the German 'mark', it was part of the trip to Germany.
Strong and stable currency, and loved them both. I guess I'll never get used to the fucking worthless euro.
-
simgin
- Meme Fodder
- Posts: 1167
- Joined: Sun Jan 06, 2013 12:07 am
- Location: Bradford-on-Avon, UK
Unread post
by simgin » Fri Jan 29, 2016 10:20 pm
^ Lol, I know what you mean, but...travel to Britain or Scandinavia and the memories will come back (we still have their own currency) :)
I will meet you there.
Cheerio
Simon
Someone told me that I am delusional, I almost fell off my unicorn.
-
machinebacon
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
-
Contact:
Unread post
by machinebacon » Sat Jan 30, 2016 1:54 pm
you can
#include<goodoldtimes.h>
if you want.
/closed
..gnutella..