1. ## hello, please can i have some urgent help!

alright, sry to be another homework lout,

programmin is not my forte but is one of my modules... i am expected to do this program, however i am baffled. need it done today... so i AM open to bribes. lol.

this should tho, i assume, be very easy for the experienced programmer.

Please do what you can. many many thanks!!

......

For a single cylinder in potential flow, moving with a velocity of magnitude V(infinity), the velocity at any point on the surface of the cylinder is=

v=2V(infiniti)sin(theta)

the pressure coefficient is given by :

C(p) = 1-4Sin^(2)(theta)

pressure coefficient on surface of sphere:

C(p) = 1-9/4Sin^(2)(theta)

(theta) is the angle measured from the direction of the parallel flow to a point on the surface of the sphere.

now, the program.

construct a program for a user who need to calculate the potential flow around a circle and sphere.

Your program sould include the following:

a. A function for calculating velocity and pressure coefficient around a circle.
b. A function for calculating velocity and pressure coefficent around a sphere.
c Program output should be stored in a file specified by the user.

2. In general here on the forums we don't give out code (especially homework code), unless the OP (that's you), shows us that you have at least tried to do some of it first.

3. alrite well, i dont know how to do this task
however i can show you the code i have done which was a similar task, for finding the coordinates of an element of a square.

printf("Please enter the element number you wish to know the position of: ");
scanf("%f", &number);

if (number > 25)
printf("\nInvalid element number entered, following data is irrelevant\n");
else
printf("\nThank you\n\n");

if (number < 6)
coa=number;
else
if (number < 11)
coa=(number-5);
else
if (number < 16)
coa=(number-10);
else
if (number < 21)
coa=(number-15);
else
if (number < 26)
coa=(number-20);
else
printf("\nInvalid element value entered, please close program and start again\n\n");

if (number < 6)
cob=1;
else
if (number < 11)
cob=2;
else
if (number < 16)
cob=3;
else
if (number < 21)
cob=4;
else
if (number < 26)
cob=5;
else
printf("Invalid element value entered, please close program and start again\n\n");

co1=(coa-1);
co2=(cob-1);

printf("Co-ordinate 1 = %d,%d\n", co1, co2);
printf("Co-ordinate 2 = %d,%d\n", coa, co2);
printf("Co-ordinate 3 = %d,%d\n", co1, cob);
printf("Co-ordinate 4 = %d,%d\n", coa, cob);
getch();
return 0;

}

(floats are coa etc )

4. please just show me the way if you don't want to give me code

5. 1 Use code tags when posting code

2 I hope that is neatly indented on your editor

3 This is C++ forum, post this on the C fourm board

4 You still have not shown your attempt at the exact problem. As Twcomers stated, no person here will write the solution for you. Give it a go and post your code using code tags and then we can take a look and make suggestions or give useful comments.

6. ## hairy muff.

so much for the help for 2moro... nevermind

i didn't intend to post that code perfectly. I typed it quickly.

it is C++ I am using therefore I am in the correct forum. ...I know cout is easier

7. printf() and scanf() are C functions

Oh and I don't appreciate being called a hairy muff either, if that is what you meant in your reply heading.

Like you said, cout is a C++ object, and it is quicker to do this:

Code:
```std::cout << "Enter your name: ";
std::cin >> name;```
To this:

Code:
```printf("Enter your name: ");
scanf("%s", &name);```
But that is rather irellevant. Do you know how to go about the problem you have? If you are stuck for a program solution, use pen and paper and draft a TDD ( top down development ) of the program. If it looks like it will work, code it in C++ and see what happens.

8. just 'fair enough'

9. nope i don't know how to do it. i posted that code because, i believe an extended approach from my previous work is probably expected of me.

10. Well for the file output part, you will have to use the library fstream. If you are unsure on this look at FAQ about file io.
If you are still really stuck, get a good beginners book, the link on this site has some good recomended ones. If you hate reading loads, avoid the detiel series ones.