This is my first post in this forum, and i hope to find help !!

i have an exam 2morrow .. in C++, and i'm still having problems in understanding looping .. THIS forum is realy my last hope

I've got 2 problems in looping, i realy wish help in solving it and understanding the solution ..

1) write a program to count the vowels and alphabets in an input line of characters. Read the characters one at a time until you encounter the end-of-line character. Then print out :

- the number of occurences of each of the vowels ( a, e, i, o, u ) whether capital or small.

- the total number of alphabets, and

- the integer percentage of each vowel.

Note that the program should ignore all non-alphabrts.

Example;

for the following input :

A good word is a charity

suggested output format is;

number of vowels:

a 3 , e 0 , i 2 , o 3 , u 0

total number of letters is 19

Integer Percentages of each vowel:

a 16% , e 0% , i 11% , o 16% , u 0%

--------------------------------------------------------

2) Tragectory of a stone Consider the trajectory of a stone that is hurled into the air with an initial velocity v at an angle to the horizontal of ( @ ) radians. Neglecting drag due to friction with the atmoshere, the following equations describe the stone's distance ( d ) from the initial spot and the height (h) of a stone at time t :

d = [email protected] ... as for distance

h = [email protected]/2 g.t^2 ... as for height

where g is the acceleration due to gravity ( 9.8m/s2 (

or 32 ft/s^2

a) write a program that will generate a table that gives the distance and hieght of the stone for every tenth of a seconds, assuming that the initial velocity is in ft/s and the angle in degrees are read from the keyboard.

write program that will generate a table that gives the distance and height of the stone for every tenth of a second until it hits of a second until it hits the ground. Assume that the initial velocity is 75 ft/s at an angle of 30[color=#3366FF]

** @ is the angle theta.

** ^2 , is power 2 or square !!

This post has been edited by **Mi$s-Q8**: 30 April 2008 - 08:24 AM