• Welcome to Religious Forums, a friendly forum to discuss all religions in a friendly surrounding.

    Your voice is missing! You will need to register to get access to the following site features:
    • Reply to discussions and create your own threads.
    • Our modern chat room. No add-ons or extensions required, just login and start chatting!
    • Access to private conversations with other members.

    We hope to see you as a part of our community soon!

The Random, Meaningless Announcements Thread 3!

sun rise

The world is on fire
Premium Member
1d429f005e5f013bd61f005056a9545d
 

sun rise

The world is on fire
Premium Member
I asked Chatgpt to write a C program to calculate the probability of two people having the same birthday depending on the number of the people in the room. It wrote a naive program not taking into account 0 or gibberish being entered as a number. So I asked it to rewrite checking input and this is what it wrote. Clearly it fails the C programming "turing test"

#include <stdio.h>
#include <math.h>
#include <stdbool.h>

int main() {
int num_people, i;
double probability = 1;
bool valid_input = false;
while (!valid_input) {
printf("Enter the number of people in the room: ");
if (scanf("%d", &num_people) != 1 || num_people <= 0) {
printf("Invalid input. Please enter a positive integer.\n");
while (getchar() != '\n'); // clear input buffer
} else {
valid_input = true;
}
}
for (i = 1; i <= num_people; i++) {
probability *= (365.0 - (i - 1)) / 365.0;
}
printf("The probability that two people have the same birthday is: %f\n", 1 - probability);
return 0;
}
 

Wu Wei

ursus senum severiorum and ex-Bisy Backson
and then started to stalk...

There once was a man from Nantucket...
whose bear was so small he could chuck it.
so he went for a walk....
and then started to stalk...
and then promptly trip over a bucket


admittedly I had an entirely different last line in mind....but I doubt the RF sensors would have appreciated it....you know....... "but decided its dumb and said....".... well you know.......
 

Revoltingest

Pragmatic Libertarian
Premium Member
There once was a man from Nantucket...
whose bear was so small he could chuck it.
so he went for a walk....
and then started to stalk...
and then promptly trip over a bucket
Meter is all wrong....last line's accent isn't on every 3rd syllable.
Compare with....

There once was a man from Nantucket
whose bear was so small he could chuck it.
He went for a walk
And started to stalk
A cat that was really a bucket

It makes no sense (I had nuthin clever),
but it sounds right. Lines 1, 2, & 5 all
start out with the accent on the 2nd word.
 

Wu Wei

ursus senum severiorum and ex-Bisy Backson
Meter is all wrong....last line's accent isn't on every 3rd syllable.
Compare with....

There once was a man from Nantucket
whose bear was so small he could chuck it.
He went for a walk
And started to stalk
A cat that was really a bucket

It makes no sense (I had nuthin clever),
but it sounds right. Lines 1, 2, & 5 all
start out with the accent on the 2nd word.

Well..... I have only one...or 2 things to say about that....SHUT YER DING DANG PIE HOLE!!!!! WHO ASKED YA!!!!!
 

Revoltingest

Pragmatic Libertarian
Premium Member
Well..... I have only one...or 2 things to say about that....SHUT YER DING DANG PIE HOLE!!!!! WHO ASKED YA!!!!!
There once was a bear who stole pie
from pickanick baskets he'd spy.
Today he took one
From Willie the Hun
Who hurled at the bear's eye.
 
Top