Ariana
gosh why is checking for collisions taking longer to write than writing the rest of the simulation
Dima
depends on how did you implement that
BinaryByter
gosh why is checking for collisions taking longer to write than writing the rest of the simulation
you could just take the slow opproach and check for every element :shrug:
Ariana
🤔
Ariana
I have access to supercomputers
Ariana
should i
Ariana
naf ill get killed by everyone
BinaryByter
isnt that what you want?
Ariana
mdr
BinaryByter
*vertical chopsticks in rice pot emoji*
Anonymous
Already read, thanks for having me here
Dima
welcome
🌚
I need program that prompts the user to enter the number of students and each student’s score, then finally displays the highest score by using Array assume number of students 30.
🌚
I need program that prompts the user to enter the number of students and each student’s score, then finally displays the highest score by using Array assume number of students 30.
#include <iostream> using namespace std; struct student { char name[50]; float marks; } s[3]; int main() { cout << "Enter information of students: " << endl; for(int i = 0; i < 3; ++i) { cout << "Enter name: "; cin >> s[i].name; cout << "Enter marks: "; cin >> s[i].marks; cout << endl; } cout << "Displaying Information: " << endl; for(int i = 0; i < 3; ++i) { cout << "Name: " << s[i].name << endl; cout << "Marks: " << s[i].marks << endl; } return 0; }
🌚
I tried this , but I coudn't get the highest grade 🙆🏽‍♂️
Dima
at least you tried… you need to perform calculations to find highest grade
Dima
currently this code does nothing to calculate that
Abdulaziz
hi everybody
BinaryByter
stop ignoring my skeleton
BinaryByter
my skeleton wants to be greeted too
BinaryByter
hi everybody and everyskeleton*
BinaryByter
my skeleton is pushing everybody down who doesn't great it
BinaryByter
his reply was a good one
BinaryByter
I could not have made a better reply
BinaryByter
unless I tried
🌚
thank u all
🌚
Dima
format your code properly here in telegram
Dima
you will only get one highest mark three times
Dima
yes you should
Dima
🌚
Okay, thanks a lot
🌚
Yeah, I'm student .. okay☺️
Abdulaziz
Yeah, I'm student .. okay☺️
which university you study ?
🌚
University in Yemen !!!
mark
merry christmas programmers!
BinaryByter
no
BinaryByter
switch case terms don't cover stuff like "<" or ">" or "!="
BinaryByter
no
BinaryByter
remember what hes doin'g
BinaryByter
you can't test for something being "bigger" or "smaller" with a switch
BinaryByter
switches DONT evaluate booleans
BinaryByter
still not something a switch does
BinaryByter
where would you use a switch here?
Ariana
Just if else
BinaryByter
Dima
where would you use a switch here?
that’s switching my cases ( ͡° ͜ʖ ͡°)
BinaryByter
switch doesn't call functions
Ariana
What
Ariana
Wait
BinaryByter
switch just compares values
Ariana
Show a example using switch case
Ariana
I’ll wait
BinaryByter
Not, iirc
BinaryByter
how about making one case for every age?
BinaryByter
should be fun
Ariana
:)
BinaryByter
should we include those over 120 years too?
Ariana
I’ll be waiting
BinaryByter
Yes
whats the upper bound of the set of ages that our program has to cover?
BinaryByter
and the lower bound?
BinaryByter
also, are there equivalence relations?
Ariana
Idk, int limits i guess
BinaryByter
also, are there equivalence relations?
i'd say we relate every age that is bigger than the lower bound and smaller than 18 to the string "you are not old enough to vote"
BinaryByter
how does that solve your problem?=
BinaryByter
Well your problem was that the if's were cumbersome
BinaryByter
but thise doesn't improve anything
Ariana
Like full example
Ariana
of this
Ariana
WTF
Ariana
Are you
Mahbøøb
Helo.
Ariana
w
Ariana
fv
Ariana
syhe