+ 7

Challenge : Write a program that will work out the distance travelled if the user enters in the speed and the time.

Write a program to work out the areas of a rectangle. Collect the width and height of the rectangle. Calculate the area. display the result. Prior Knowledge Needed: How to create variables How to input data into a variable How to display variables You can make code in any programming language.

31st Jan 2018, 10:43 AM
Vansh
Vansh - avatar
5 Respostas
+ 13
@Vansh , motion of the body is uniform (ie ... accn is 0) then distance =vt //for displacement ... it will take use of coding skill /* suggestion ::: u can modify your challenge to calculate displacement ... if height-width of rectangle specified , velocity & time also specified with starting point & direction clockwise or anticlockwise */
31st Jan 2018, 10:48 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 13
in c++: int speed, time; cin >> speed >> time; cout << " distance is: << speed * time;
31st Jan 2018, 12:19 PM
Vukan
Vukan - avatar
+ 12
int width, height; cin >> width >> height; cout << area of rectangle is: << 2 * width + 2 * height;
31st Jan 2018, 12:21 PM
Vukan
Vukan - avatar
+ 6
Vukan, area of rectangle is width*height.
31st Jan 2018, 12:25 PM
int24h
int24h - avatar