A couple of quick questions, I am only at studio.h why all the other libraries?
Also if I understand it, you are reading the output as characters and not numbers (thus bypassing the difficulty of rounding decimals that are binary numbers) and then flagging when a character is read?
Also are we not able to just round the number in the decimal system and flag it that way?
Ps this seems to bea common college question from my google searches, I am surprised that the answers available are so mixed on this one🚁
Pls help me understand your answer a little more fully.
The libraries were copied and pasted from an example and may not be required. Try remming the library and see if the script still compiles.
The original script was modified because of misspelling a function name. The executable results flew off the screen and impossible to understand what was happening. The getc(); function paused output and slight changes could be made to see their effects, also to test where and when to break execution once the desired result was established.
I was unsure of the numeric output format required.
Were you able to adjust your script and achieve your goal?
Yes the number of substantive world class c based programs rather contradicts the previous statement. Agreed
I have cracked it.
Pi posed a number of unique problems: from what I can see it only ever approaches - never reaches the number so = is out
Also if you look at the equation the resultant is oscillating above and below our target value which also poses some problems
My solution was to put Pi between a pair of < Pi < signs with the values being to an appropriate figure when rounded to the desired significant figures and then to put a break and print statement (basically a simple if statement under the first two)
It does solve the problem as stated in the question although I am certain it is only one approach among a number of options.
I liked it because it is easy and uses very simple programming tools and statements.
I’ll drop the actual code when I get on a desktop / laptop in he next day or so.
Now I have to figure out a permutation problem - thanks for your help. I hope you like my solution as well
In that analogy the bus is more productive than the race horse. A race horse can only carry at most two people. However, the bus can move 20+ times that at once. Not to mention that bus lacks physical limitations of a living creature.
double pi=0, b=4.0, x=1.0;
int y=0, i=3;
} // end if
//printf("%s\n", "hello"); // test assistance - remove this for production
} // end else
if (3.135<pi && pi<3.145)
printf("The number of iterations is: %d", y);
} //end if
} // end for
} // end main
I really like how it is so easy to create a C application using Linux as you can see from the remmed statements at the top of my source code. Just one command line to compile and run the program. Ctrl-C to quit if on the off-chance the program runs amok
Hi sorry i wasn’t clear I’m looking for a mobile app to embed Ina program I am considering on developing. It would be an open source video conferencing program good for teaching (like Big Blue button) but iOS compatible.
I am using Linux Fedora 23. Yes, I love my Linux and have been gradually weaning myself off Microsoft.