Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

BecomeMyFan=D

Is there a mathematical way to do what this C program does

  • 3 years ago
  • 3 years ago

  • This Question is Closed
  1. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    #define close_enough 0.01 main() { char facts[] = {"fat (grams)", "calcium (%)", "carbs (grams)", "vitamin D (%)", "cholesterol (%)" }; double ingred[3][5] = { { 0, 1, 2, 4, 3 }, { 3, 4, 5, 0, 3 }, { 0, 6, 0, 7, 8 } }; int numbers_should_equal_this[] = { 15, 43, 4, 7 ,3}; int looper[3]; for (looper[0] = 0 ; looper[0] < 100 ; looper[0]++) for (looper[1] = 0; looper[1] < 100 - looper[0]; looper[1]++) for (looper[2] = 0; looper[2] < 100 - (looper[0] + looper[1]) ; looper[2]++) if (ingred[0][0] * (looper[0] / 100.0) < close_enough) if (inged[1][0] * (looper[1] / 100.0) < close_enough) if (sugar[2][0] * (looper[1] / 100.0) < close_enough)

    • 3 years ago
  2. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    :) it is not complete, but you get the idea

    • 3 years ago
  3. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    What is it meant to do?

    • 3 years ago
  4. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    You do have a mathematical way to do this - it's your algorithm.

    • 3 years ago
  5. suzi20
    Best Response
    You've already chosen the best response.
    Medals 0

    this is not complete but complicated

    • 3 years ago
  6. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    I'm closing my eyes. I had a test yesterday in Object Oriented Programming ._.

    • 3 years ago
  7. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    it will figure out what ratios of ingredients are needed for a given food. For example I have a cheesecake snack which contains only cream cheese, sour cream, sugar and eggs. I know from the box the nutritional facts of the box, and I know the nutritional facts about each ingredient. Now with this information I should be able to figure out the ratios with a program that just tries every possibility and checks to see if the numbers work.

    • 3 years ago
  8. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    simple

    • 3 years ago
  9. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    OOP is cool but this is not OPP

    • 3 years ago
  10. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    noticed.

    • 3 years ago
  11. suzi20
    Best Response
    You've already chosen the best response.
    Medals 0

    is this linear programming?

    • 3 years ago
  12. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    you guys should see my 24000 lines C++ code LOL

    • 3 years ago
  13. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    programming scares me

    • 3 years ago
  14. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    I guess it is procedural programming, not linear, IMHO

    • 3 years ago
  15. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    programming is easier than most ppl think

    • 3 years ago
  16. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    lol angoo, I do practice programming, but I don't go deep into it.

    • 3 years ago
  17. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    my programs never work properly and i have no patience and just get angry

    • 3 years ago
  18. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    what language do you use loki

    • 3 years ago
  19. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    LOL , let me guess, error error unable to complie LOL

    • 3 years ago
  20. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    some random crap

    • 3 years ago
  21. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    which language do you use? Java, C++? C? C# etc etc

    • 3 years ago
  22. suzi20
    Best Response
    You've already chosen the best response.
    Medals 0

    i used C program with bloodshed dev c++

    • 3 years ago
  23. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    you can learn enough of programming to make a simple text based role playing game in about a month

    • 3 years ago
  24. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    I don't know. I was forced to do some as part of my degree. C or something.

    • 3 years ago
  25. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    I use Java , since it's the only language available to practice here in campus

    • 3 years ago
  26. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    YEY!!! I also used to use Bloodshed

    • 3 years ago
  27. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah, you're all nerds...

    • 3 years ago
  28. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    lol =D

    • 3 years ago
  29. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    I ain't a nerd, you should see me in real life LOL, you would be surprised

    • 3 years ago
  30. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    I know you are kidding, so am I

    • 3 years ago
  31. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    there's a difference between a nerd and a geek, geek = computer more person, nerd = study more person lol

    • 3 years ago
  32. suzi20
    Best Response
    You've already chosen the best response.
    Medals 0

    to make a mathematical program from complicated case, u have to learn linear programming, i think.

    • 3 years ago
  33. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    no need

    • 3 years ago
  34. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    so you're saying if i saw you, i *would* think you were a nerd?

    • 3 years ago
  35. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    I was so proud of the program I wrote lol, finding the factorial of a number >_<

    • 3 years ago
  36. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    it took me AGES ._.

    • 3 years ago
  37. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    no, you would not, not a chance, everyone is surprised when I tell them I am into computers and geek stuff

    • 3 years ago
  38. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    they think I am a bodybuilder or something

    • 3 years ago
  39. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    kidding, no, in real life you it is quite easy to see I am into TECH

    • 3 years ago
  40. suzi20
    Best Response
    You've already chosen the best response.
    Medals 0

    in the end noone can solve ur algorithm lol

    • 3 years ago
  41. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    lol, in other words , a geek with a pretty smile =D I guess?

    • 3 years ago
  42. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    =D

    • 3 years ago
  43. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    I am just trying to confuse you all

    • 3 years ago
  44. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    LOL =D

    • 3 years ago
  45. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    not working here ^_^

    • 3 years ago
  46. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah, I'm confused.

    • 3 years ago
  47. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    LOL!

    • 3 years ago
  48. suzi20
    Best Response
    You've already chosen the best response.
    Medals 0

    hahaha

    • 3 years ago
  49. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    then angoo striked one person, he's what do you call that thing, um, socializing thingy?

    • 3 years ago
  50. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    so guys, anyone wants C++ lessons? *eating a bannana*

    • 3 years ago
  51. suzi20
    Best Response
    You've already chosen the best response.
    Medals 0

    BMF u made a HERO confused, well done

    • 3 years ago
  52. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    he has done it before lol

    • 3 years ago
  53. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    loki is drunk ~

    • 3 years ago
  54. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    bananas get you excited LOL

    • 3 years ago
  55. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    I never want to see C++ or any C again

    • 3 years ago
  56. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    I have never even seen C++ or C

    • 3 years ago
  57. suzi20
    Best Response
    You've already chosen the best response.
    Medals 0

    i want to see A always

    • 3 years ago
  58. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    If I can't do it with pen and paper or on excel, i get someone to write up a program

    • 3 years ago
  59. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    C++ is very simmilar to java

    • 3 years ago
  60. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    try try try again and again

    • 3 years ago
  61. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    that's what I've heard andy

    • 3 years ago
  62. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    but they say C++ is alot more easier than Java

    • 3 years ago
  63. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    my problem is that it's so finicky. so much room for error. one mistake and you can spend hours looking for it.

    • 3 years ago
  64. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    and, no, bananas do NOT get me excited, they are just fruit

    • 3 years ago
  65. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    lol, they get you excited :)

    • 3 years ago
  66. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    nah, java and C++ are exactly of same difficulty

    • 3 years ago
  67. suzi20
    Best Response
    You've already chosen the best response.
    Medals 0

    ahh outta topic

    • 3 years ago
  68. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    they have a very long-named chemical that I don't remember that gives you energy ^_^ same thing with chocolate and barely. I forgot the name hmm wait

    • 3 years ago
  69. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    just that, java is used for one thing, and C++ in other situations

    • 3 years ago
  70. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    Oh yeah, Tryptophan! :) that's what it's called

    • 3 years ago
  71. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    Tryptophan puts you to sleep!

    • 3 years ago
  72. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    banana , choco, and barely = goog for heart = because they contain serotonin.

    • 3 years ago
  73. lokisan
    Best Response
    You've already chosen the best response.
    Medals 0

    it's in turkey

    • 3 years ago
  74. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    lol, it's in bananas, chocolate and barely lol

    • 3 years ago
  75. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    I have attended an Organic Chemistry course for fun ^_^

    • 3 years ago
  76. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    Java: -Finances -Web -Simple boring games C++ -Operating Systems -Almost all comercial software -Bank server software -Airplane software -3D games (like for PS3, PC...)

    • 3 years ago
  77. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    but they're using java now

    • 3 years ago
  78. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    who?

    • 3 years ago
  79. suzi20
    Best Response
    You've already chosen the best response.
    Medals 0

    folks, all of u get a job, someone asking about max domain

    • 3 years ago
  80. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    everyone

    • 3 years ago
  81. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    I'm not sure of the maximal domain >_<

    • 3 years ago
  82. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    nope, not everyone, java is great for smal programs, C++ is good for complex comercial ones, the multimilion ones

    • 3 years ago
  83. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    They've stopped teaching C++ though

    • 3 years ago
  84. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    do you know why? because with java it is easyer to make simple programs and dysplay simple graphics, which is good for learning, but C++ can take very long time to learn, just to draw a cube on the screen is hard

    • 3 years ago
  85. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    They say that in computer engineering, C++ will be taught and Java will be ignored.

    • 3 years ago
  86. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    anyways, languages are languages, all function the same in the end.

    • 3 years ago
  87. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    all have one place to go, all have same use.

    • 3 years ago
  88. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    stupid computer with some human intelligence

    • 3 years ago
  89. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    obedient to the rules.

    • 3 years ago
  90. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    etc.

    • 3 years ago
  91. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    check this, it has a simple C++ program with two 3D objects spinning aroun, AND a cpp file with the SOURCE CODe

    • 3 years ago
    1 Attachment
  92. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    so finaly you can see how C++ looks and how much code you need to do that simple stuff

    • 3 years ago
  93. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    I'll check it later , thanks

    • 3 years ago
  94. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    I guess

    • 3 years ago
  95. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    oh, and check this, it is more fun# =D

    • 3 years ago
  96. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    :)

    • 3 years ago
  97. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    will do

    • 3 years ago
  98. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    make sure to examine the code =D LOL

    • 3 years ago
  99. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    the cpp file

    • 3 years ago
  100. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    not in my current mood lol, but I will later.

    • 3 years ago
  101. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    thank you.

    • 3 years ago
  102. nowhereman
    Best Response
    You've already chosen the best response.
    Medals 0

    If you want a mathematical way, you should consider functional programming. e.g. Haskell

    • 3 years ago
  103. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    lol, finally someone has answered the question that was displayed

    • 3 years ago
  104. BecomeMyFan=D
    Best Response
    You've already chosen the best response.
    Medals 0

    ok, I will check out haskell, shouldn't be hard after learning C++

    • 3 years ago
  105. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    if you're good at the previous ones, then the new ones will be easily absorbed by you ^_^

    • 3 years ago
  106. nowhereman
    Best Response
    You've already chosen the best response.
    Medals 0

    Well, it is, after all, a different programming paradigm. You not only have to learn new names and a little syntax, but you also have to think differently about your algorithms — in a more mathematical way.

    • 3 years ago
  107. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    yeah, algorithms algorithms

    • 3 years ago
  108. sstarica
    Best Response
    You've already chosen the best response.
    Medals 0

    I'm off to go soon, later :)

    • 3 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.