Skip to main content

Questions tagged [math]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

pset1 credit 2023 , do while loop with arrays/intervals

#include <cs50.h> #include <stdio.h> int main(void) { long n; do { n = get_long("13 digits or at max 15, 16 card number: "); } while(n < ...
REJEN RJ's user avatar
0 votes
1 answer

Numbers with printf -- sanity check

I'm working on week 2's problem set and I ran into a floating point exception. In trying to use printf to diagnose the problem, I'm finding something I can't figure out. #include <stdio.h> #...
Adam Mann's user avatar
1 vote
2 answers

cash (less) - ouput is not converting from dollars to cents or rounding

hi i'm trying to convert the users input from dollars to cents. every time it just prints exactly what i typed in, so if i enter 0.20, the output is 0.200000. my math.h seems to be having no effect ...
JFTrees's user avatar
  • 25
0 votes
1 answer

Help in Resize, biSize headers not sizing correctly

#include <stdio.h> #include <cs50.h> #include <stdlib.h> #include <math.h> #include "bmp.h" int main(int argc, char *argv[]) { // ensure proper usage if (argc != 4) ...
Zelo Avarosa's user avatar
0 votes
1 answer

pset3: multiply x by y, n times

I've already completed this pset, but I'd like to improve my understanding of one part of it, so this is a maths question. I'm using a for loop to calculate hz in relation to octave in the notation ...
orionrush's user avatar
  • 101