i need help as soon as possible help me convert this to c program
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
//declare variables
int totalCals = 0;
int fatGrams = 0;
int fatCals = 0;
double fatPercent = 0.0;
//enter input items
cout << "Total calories: ";
cin >> totalCals;
cout << "Grams of fat: ";
cin >> fatGrams;
//determine whether the data is valid
if (totalCals >= 0 && fatGrams >= 0)
{
//calculate and display the output
fatCals = fatGrams * 9;
fatPercent = static_cast<double>(fatCals)
/ static_cast<double>(totalCals) * 100;
cout << "Fat calories: " << fatCals << endl;
cout << fixed << setprecision(0);
cout << "Fat percentage: " << fatPercent << "%" << endl;
}
else
cout << "Input error" << endl;
//end if
system("pause");
return 0;
}
//end of main function
//end of main function