Hi...I can help you with this question
When do you need a answer ?
i need it right away with as much detail as possible. i am trying to learn this stuff online but the instructor is never available. so it will be self taught
Write an algorithm to compute the volume of water in cubic feet, flowing through a pipe of diameter d in feet, with a velocity of v feet per second. The formula to compute the volume flow rate per second is given by:
Are you there
yes I am
What do you think?
I could not open these images
ok let me type them
Can you send me links ?
I think I cna see the gifs in this chat...
so you just need a algorithm right ?
I am going to just write a algorithm in plain english language...is that ok ?
R=d/2 was the first part
will it be in c
will i be able to learn from it
I can make a program in C language, but that is different from algorithm (which will be in plaing english) language..
I will do whatever helps you out
What would you prefer ? Have you done any C programming ?
never trying to learn it. would like to see it as it would appear in the compiler
am i being difficult
ok..I can write a C program for this as the compiler can understand a C program not algorithm
Give mew few minutes to write a c program for you..
have you run a c program before ?
i have the compiler open as the instructer said to thats about it.
ok...have you executed nay c programs before ...
the book "C Programming" isnt much either
I wnat to make sure you have executed a c program before this
ok...I will write a program and help you understand it....
You may run into environment issues if you have not run a c program before this
However I can't guarantee that you maybe able to run it on your machine...as your machine may not have evreything setup correctly
But I will try my best to help as much as I can
i can tell you what i did so far
Open Visual Studio
Select "file" then "New Project"
Under the Visual C++ project type - select empty project
Enter a name and location for your project and hit OK.
In the solution explorer - right click on source files and choose "Add New Item"
Choose C++ (.cpp file) - even though you will be using "C" and not "C++"
Enter a name for the file like week1 and hit "Add"
This will open a code editor.
Once you enter your source code in this main window, choose "Debug" then "Start without Debugging" to compile and run the program. (Note: If using Visual Studio 2010 and the output screen disappears when debugging – see FAQ item below for tip on how to leave the output console open)
When things are working, you will need to submit the .cpp file for grading.
does that make better sence
:) yeah a little bit...
I am working on the program
Here you go...
Here is the link - http://wikisend.com/download/406134/main.cpp
Download it and copy paste the code from this file into your .cpp file
ok downloaded and pasted
I have added comments to code so that you understand it
do you understand the code ?
where are the comments. I dont understand the code. should i debug it
are the comments in red
comments are usually in grey color
no grey lettering
black blue green and red
unfortunately I do not know why you are seeing that
it depends on the preferences
how do i see it working. i know i should debug then execute and test
right click on the file...and hit "Run"....
do you see a Run option ?
it says object reference not set to an instance of an object
not sure why you are seeing that error my friend
you still there
as I said I can help you with this program and write it for you...but since you have not run a C program before it may be difficult for you until you run a few sampes first
so should i debug it
you should be able to run and debug both..same code should work for both
I suggest you run basic examples first..before you run a program like this
Something like a sample program for Hello World
ok so it says the project is out of date and would i like to build it when i start the debug.
please build it first
its running now
the command prompt came up and ask me for diameter and velocity
You did it !
then it says the program has exited with code 0 (0x0)
did it print volume before it did that ?
can you copy paste eveyrhting form command prompt ?
Enter a value for diameter : 12Enter a value for velocity : 12Volume of water flow is : 1356.480000Press any key to continue . . .
that woked great
that is all good
this is expected outcome...
show this to your teammates or whoever is reveiwing your assignment and let me know if you have any concerns
cool im just going over the code i see how you broke it down to the simplest form
Anything after a // is a comment in English language
Anything before a semicolon ; is C language code
oh now i see the comments their green
They are self explanatory
But if you need help let me know
thanks i have learned more from you in a hour and a half then i have from my prof.
Well if you are satisfied with my answer please Accpet Answer and in future please add "For ATLProg" to your question and I will get a email
so whats next do you do tutoring
ok thanks a lot your great