+ 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.
5 ответов
+ 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 */
+ 13
in c++:
int speed, time;
cin >> speed >> time;
cout << " distance is: << speed * time;
+ 12
int width, height;
cin >> width >> height;
cout << area of rectangle is: << 2 * width + 2 * height;
+ 6
Vukan, area of rectangle is width*height.