Daddy Electons "Chit-Chat"

Here you can discuss anything you want to about the elections.

"We can be wrong, or we can know it, but we can't do both at the same time." ~ Heisenberg
RETIRED ELECTION MANAGER

6 Replies

FATHER


CarKing the 6th of the Abrahamic Caliphate

Shhhhhh


CarKing the 6th of the Abrahamic Caliphate

#include

int main(void) {

//interrogation regarding mass

int mass;

printf(" What is your objects mass?\n");

scanf("%d", &mass);

int weight = mass * 9.8;

printf(" Your object is %d newtons.\n", weight);

// if statements

if (weight > 1000) {

printf("Your object is over 1000 newtons, it is too heavy.\n");

}

else if (weight < 10) {

printf("Your object is under 10 newtons, it is too light.\n");

}

return 0;

}

Unrelated, but can anyone run this code without an error? I kept on getting one but now its gone. It's C code lang.

Kind regards,
Donk
Bytro game addict and avid CoW player.
"Þ" > "th"
Слава
Україні!

412 for the win!

TMC

Donk2.0 wrote:

#include

int main(void) {

//interrogation regarding mass

int mass;

printf(" What is your objects mass?\n");

scanf("%d", &mass);

int weight = mass * 9.8;

printf(" Your object is %d newtons.\n", weight);

// if statements

if (weight > 1000) {

printf("Your object is over 1000 newtons, it is too heavy.\n");

}

else if (weight < 10) {

printf("Your object is under 10 newtons, it is too light.\n");

}

return 0;

}

Unrelated, but can anyone run this code without an error? I kept on getting one but now its gone. It's C code lang.

check your indexing and brackets. Usually that’s the problem. Otherwise, use AI to solve the problem.
Looking for improvement.

JASLOLY wrote:

Donk2.0 wrote:

#include

int main(void) {

//interrogation regarding mass

int mass;

printf(" What is your objects mass?\n");

scanf("%d", &mass);

int weight = mass * 9.8;

printf(" Your object is %d newtons.\n", weight);

// if statements

if (weight > 1000) {

printf("Your object is over 1000 newtons, it is too heavy.\n");

}

else if (weight < 10) {

printf("Your object is under 10 newtons, it is too light.\n");

}

return 0;

}

Unrelated, but can anyone run this code without an error? I kept on getting one but now its gone. It's C code lang.

check your indexing and brackets. Usually that’s the problem. Otherwise, use AI to solve the problem.
Yes, I'm pretty sure the error ended up being related to the brackets. The program used the wrong ones in some spots. It works fine now though.
Kind regards,
Donk
Bytro game addict and avid CoW player.
"Þ" > "th"
Слава
Україні!

Post a Reply

Please log in to post a reply.

Back to Discussions
Quick Launch