English, asked by durgamsrivarsha31, 5 months ago

Design algorithm and flowchart fora distance travelled by
a vehicle​

Answers

Answered by shamimara842
0

Answer:

okokokokokokokokokokokok

Answered by dreamrob
0

Algorithm:

Step 1: Start

Step 2: Declare variables s , t and d.

Step 3: Take input in variable s and t from the user.

Step 4: Calculate distance by formula d = s * t

Step 5: Print distance d

Step 6: End

Program in C++:

#include<iostream>

using namespace std;

int main()

{

double s , t , d;

cout<<"Enter Speed : ";

cin>>s;

cout<<"Enter Time Taken : ";

cin>>t;

d = s * t;

cout<<"Distance = "<<d;

return 0;

}

Output:

Enter Speed : 80

Enter Time Taken : 2

Distance = 160

Attachments:
Similar questions