добавить авторскую функцию к коду с++
#include

int main()
{
int n;
float l;
std::cin >> n >> l;
switch (n)
{
case 1:
std::cout << "Length dm: " << l / 10;
break;
case 2:
std::cout << "Length km: " << l * 1000;
break;
case 3:
std::cout << "Length m: " << l;
break;
case 4:
std::cout << "Length mm: " << l / 1000;
break;
case 5:
std::cout << "Length sm: " << l / 100;
break;
default:
break;
}
std::cout << std::endl;
system("pause");
return 0;
}
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.