Jump to content

Liam mallka

Member
  • Posts

    14
  • Joined

  • Last visited

Awards

This user doesn't have any awards

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Liam mallka's Achievements

  1. I got this code in a test where I can use friends, the internet, etc... and I need to explain what problem this code solves, however I cant figure it out the output that I got is 1 2 3 5 7 11 12 but I cant connect the numbers. N=15
  2. < #include <stdio.h> #include <math.h> void math(int a, int b); int main() { int a, b; printf("Enter 2 numbers: "); scanf("%d %d", &a, &b); math(a, b); return 0; } void math(int a,int b) { int i = 0; for (i = a; i >= b; i--) { if (i % b == 0) { printf("i = %d b = %d\n", i, b); printf("%d \n", i); } } }>
  3. idk how to do the first max and second max like the output says
  4. Liam mallka

    while

    hey I need help with my code I need to get that output and I have no idea how to do the first max and second max so far I came up with this
  5. I just made this code and im having hard time with the flag please help me.
  6. I thought that the answer here is always because -8 and 7 arent 0 but its actually false, any ideas why?
  7. I know how to scan ab integer but im not sure how to check but I think that it goes like that "if (x < 0)
  8. no documentation in my question I only got this: Write program receiving an integer and prints the absolute value (absolute value). Do not use the abs command except for conditions only! Please note that in this question only one condition is sufficient.
  9. Im scanning the number from the client so I cant do that.
  10. Hey there, I want to print absolute value in c but I cannot use abs only conditions like if, else, else if, please help me out with that.
  11. What the output of the next plan and explain why this is the output.
  12. The card drive in black doesn't work and I'm running out of storage any idea what's wrong and how to fix this?
×