2023 Write a function called convert weight This function should convert between pounds and kilograms and vice versa Here is | Assignment Collections
Computer Science 2023 Write a function called
2023 Write a function called convert weight This function should convert between pounds and kilograms and vice versa Here is | Assignment Collections
Write a function called convert_weight. This function should convert between pounds and kilograms, and vice versa. Here is the prototype for this function:
void convert_weight(int, char[], int*, char[]);
There are 2.2 pounds per kilogram.
The second and forth parameters are strings, which specify the units (“lbs” or “kgs”). An example call to this function is:
#include <stdio.h>
int main() {
char newline, another = ‘y’;
int weight1, weight2;
char units1[4], units2[4]; // length 4 because of ‘