Define a float variable.
Read a float value from the keyboard into the variable.
Print the variables value.
check out the solution and DO COMMENT if any queries.
-------------------
As programming language not mentioned, the below code has been developed in C++.
---------------------------
#include <iostream>
using namespace std;
int main() {
// define a float variable
float fvar;
cout << "Input a float value : ";
// read from keyboard
cin >> fvar;
cout << "\n";
// print the value
cout << fvar;
}
-------------------------------
-------------
OUTPUT ::
Get Answers For Free
Most questions answered within 1 hours.