473,473 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

What is the difference between the sun and the moon?

Please help. Send answer to ne****@india.com

Nov 15 '05 #1
6 1362

"Kenny McCormack" <ga*****@yin.interaccess.com> wrote in message
news:dd**********@yin.interaccess.com...
Please help. Send answer to ne****@india.com

#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
ptrdiff_t sval(const char *s)
{
const char a[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz";

size_t v = 0;
const char *f = 0;

while(*s)

if(f = strchr(a, *s++))
v += f - a + 1;

return v;
}

size_t diff(const char *s1, const char *s2)
{
return (ptrdiff_t)fabs(sval(s1) - sval(s2));
}

int main()
{
const char comp1[] = "the sun";
const char comp2[] = "the moon";

printf("The difference betweeen %s and %s is %lu\n",
comp1, comp2, (unsigned long)diff(comp1, comp2));

return 0;
}
-Mike
Nov 15 '05 #2
Kenny McCormack wrote in the subject line:

What is the difference between the sun and the moon?


One is purple and the other is salty.

--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>

Nov 15 '05 #3
"Kenny McCormack" <ga*****@yin.interaccess.com> wrote in message
news:dd**********@yin.interaccess.com...
Please help. Send answer to ne****@india.com


Unless you're disabled and cannot see or sense, there's half a dozen of
properties that you should be able to list yourself.

Alex
Nov 15 '05 #4
"Alexei A. Frounze" <al*****@chat.ru> writes:
"Kenny McCormack" <ga*****@yin.interaccess.com> wrote in message
news:dd**********@yin.interaccess.com...
Please help. Send answer to ne****@india.com


Unless you're disabled and cannot see or sense, there's half a dozen of
properties that you should be able to list yourself.

Alex


Please do not feed the troll. (The fact that he's trying to make fun
of trolls may or may not make him less of a troll himself, but at the
very least don't take him seriously.)

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #5
Alexei A. Frounze wrote:
"Kenny McTrollack" wrote:
Please help. Send answer to new...@india.com


Unless you're disabled and cannot see or sense, there's half a dozen of
properties that you should be able to list yourself.


Well, I learned a new word from all this: syzygy (among
other things: when 3 bodies are lined up, esp. the Sun, Earth and Moon).

Nov 15 '05 #6
In article <ln************@nuthaus.mib.org>,
Keith Thompson <ks***@mib.org> wrote:
"Alexei A. Frounze" <al*****@chat.ru> writes:
"Kenny McCormack" <ga*****@yin.interaccess.com> wrote in message
news:dd**********@yin.interaccess.com...
Please help. Send answer to ne****@india.com


Unless you're disabled and cannot see or sense, there's half a dozen of
properties that you should be able to list yourself.

Alex


Please do not feed the troll. (The fact that he's trying to make fun
of trolls may or may not make him less of a troll himself, but at the
very least don't take him seriously.)


Yes. Listen to the man. Him speakum truth.

Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
11
by: modemer | last post by:
If I define the following codes: void f(const MyClass & in) {cout << "f(const)\n";} void f(MyClass in) {cout<<"f()\n";} MyClass myclass; f(myclass); Compiler complain that it can't find...
37
by: Xah Lee | last post by:
A Moronicity of Guido van Rossum Xah Lee, 200509 On Guido van Rossum's website: http://www.artima.com/weblogs/viewpost.jsp?thread=98196 dated 20050826, he muses with the idea that he would...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
41
by: Mountain Bikn' Guy | last post by:
What is the current preferred way to save user preferences in dotnet? Is the registry the right place to do this? Can anyone recommend a good article (or book) for this topic? Thanks.
5
by: tony collier | last post by:
To break out of a loop i have seen some people use RETURN instead of BREAK I have only seen RETURN used in functions. Does anyone know why RETURN is used instead of BREAK to kill loops?
4
by: Randy | last post by:
Compiling the following code #include <iostream> #include "cenum.h" using namespace std; class Test { CEnum MyCars("CAR", "Mustang, Nova, Pinto, Barracuda");
8
by: arun | last post by:
Hi all,, I want to know if there is any performance difference between the following sets of declarations. int i, j; and int i;
7
by: Luna Moon | last post by:
#include "stdafx.h" #include <iostream> #include <string> using namespace std; int main() { string cc(31, 'c'); string bb=cc.assign(3, 'dd');
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.