76 315
Assignments Done
Successfully Done
In May 2019

Answer to Question #16346 in C++ for Sunny

Question #16346
Write a program that converts kilogram into grams by using a user defined function. Use the return statement in the program.
Expert's answer
using namespace std;

float kg, g;

int kgtog(float kg){
& return kg*1000;

void main(){
cout<<"enter a value: ";
cout<<kg<<" kg = "<<kgtog(kg)<<" g\n";

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions