So basically we are supposed to write a code where the input is [int] [operand] [int] and what i wrote works in the first run through but every time after the first number is always 0. So 5 + 2 = 7...
Type: Posts; User: Cowmoogun
So basically we are supposed to write a code where the input is [int] [operand] [int] and what i wrote works in the first run through but every time after the first number is always 0. So 5 + 2 = 7...
So this is what I've come up with and it works how I want it to perfectly, but my question is, is it generally acceptable to use a do_while within a do_while loop. I picked up a new book recommended...
That's what I attempted to do but when 'a' is still inputted it still cancels out the program, thought it asks the qestion. I'm in week 2 of the class, and though it can be taken as an entry level...
Anyone with suggestions?
I cleaned up my code so it's much more readable, it runs as expected except I was wondering how i could allow it to allow N or n only to cancel the program and an error message if they were to put in...
The biggest problem I'm having right now is that it allows me to input the character but when i say 'Y' or 'y' the program still closes. But shouldnt it be with the do while loop?
Well I received quite a bit of help on my last post with this same lab, but I made a crucial mistake, he wants the user to control the loop for every time a calculation is made. So i thought I'd do...
my knowledge is still very minimal in programming so far, so my question is wouldnt it already be assumed that that ints and doubles are zeroed because they have no value yet? Or I guess a better...
So here is what I plan to hand in to my professor, he requires comments so many of those comments are "duh" comments but I felt i had to include them.
#include <stdio.h>
#include <conio.h>...
I really appreciate the responses on this forum, I've received a lot of help from all who responded! Anduril, i'm doing exactly what you told me to do now, i'll post the final code when I'm...
Wow...I want to kill myself with that mistake. Really have to work on my attention to detail, thank you. How is the layout of the code now based on your opinion? Is it cleaner then the first?
Here is the new code I have, I rewrote it..but now the weirdest thing..the math for my areas is wrong. For example..sides 3,4,5 should have area 6 but now im getting 7.2 -_-.
#include...
I appreciate all the comments so far and I'm implementing them to stream line the code but i'm coming across a new problem in my do while statement. Now in my while statement i have the law of a...
Ah yes that is a bit redundant, thank you for pointing that out!
Well this is my first program and it runs well with no bugs =D, but that doesnt do much if the professor doesnt think the code is modular or easy to read so I was wondering if you could give some...