Urara-Blog/node_modules/.pnpm-store/v3/files/d7/c1ecfcf119468274493a41bad10d2f66cbd1f36d98e1f2c7481ef4268bbe66d122bbc44423e384a015f8f960a377fe3846b9e701d455001988ec63585c759a
2022-08-14 01:14:53 +08:00

21 lines
No EOL
420 B
Text

// Working of implicit type-conversion
#include <iostream>
using namespace std;
int main() {
int num_int;
double num_double = 9.99;
// implicit conversion
// assigning a double value to an int variable
num_int = num_double;
cout << "num_int = " << num_int << endl;
cout << "num_double = " << num_double << endl;
return 0;
}
// From https://www.programiz.com/cpp-programming/type-conversion