In: Computer Science
write a c program of an structure based on rings(jewelry)
#include <stdio.h>
int main()
{
struct rings{
float weight;
float carots;
char material[10];
}r1;
printf("Enter weight of ring r1 :");
scanf("%f",&r1.weight);
printf("\nEnter carots of ring r1 : ");
scanf("%f",&r1.carots);
printf("Enter material yellow gold or rose gold or white gold :
");
scanf("%s",r1.material);
printf("GOLD RING FEATURES");
printf("WEIGHT = %.2f\nCAROTS = %.2f\nMATERIAL =
%s",r1.weight,r1.carots,r1.material);
return 0;
}