Answer:
Following are the program in c++ language
#include<iostream> // header file
using namespace std; // namespace
int main() // main method
{
char l; // variable declaration
int number_presss; // variable declaration
cout<<"Enter the character letter To Quit the key and num to Press: ";
cin>>l; // Read the character value
cin>>number_presss;// Read the integer value
cout<<"Press the key "<<l<<" key 4 "<<number_presss<<" times to quit"; //display the number with the format
}
Output:
Enter the character letter To Quit the key and num to Press: w
4
Press the key w key 4 times to quit
Explanation:
Following are the Explanation of the program
- Read the integer value in the "number_presss" variable by the user using cin function.
- Read the character value in the "l" variable by the user using cin function.
- Finally display their value in their respective format
The speed of light is 299212.5984 (kilometers per second), if the light 1.27 seconds to travel from Earth to the moon. If the distance is 380,000 km to the moon.
Explanation:
The given is,
Light 1.27 seconds to travel from Earth to the moon
Distance is
380,000 km to the moon
Step:1
Formula to calculate the speed,
................................(1)
Where, d - Distance
t - Time taken
From given,
d = 380000 km
t = 1.27 seconds
Equation (1) becomes,
= 299212.5984
Speed of light, s = 299212.5984 kilometers per second
Result:
The speed of light is 299212.5984 (kilometers per second), if the light 1.27 seconds to travel from Earth to the moon. If the distance is 380,000 km to the moon.
The answer is A B AND D mark me brainliest?