l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
October 7: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2002 Feb 24 00:13

The following is an archive of a post made to our 'vox mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox] Why C?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox] Why C?



On Sat, 2002-02-23 at 22:06, Ryan wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I'm currently teaching myself perl, IT ROCKS!

Hehe, bet it does :).

Anyway, took me 15 minutes to remember some simple stuff...But have not
touched C programming in 3 or so years, even then wasn't that advanced:

Guess I can share...

#include<stdio.h>

/* Just trying to remember the basics, wish I knew a whole lot more and
in depth. The source code gives the answers hahaha */ 

int me;
int you;
int take;
/* int i; just for later perhaps */

int main()
{

printf("Simple number game!!!\n");
printf("Type in a number:");
scanf("%d", &me);

printf("the number is %d\n", me);

printf("Now lets take that number and take it away...Enter number: ");
scanf("%d", &you);
take=me-you;

printf("Here is the result: %d\n", take);

printf("Now I am going to try something a little harder.\n");

if (take!=200)
{
 printf("Oooops wrong...Choose again, must be between 100 and 200\n");
}
else
{
 printf("That is quite correct, the number was 200...:)\n");
}


return 0;
}


Actually find C++ easier, is that normal? :).

Matt


_______________________________________________
vox mailing list
vox@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!