Problems w/ Structures 'C' -
I need to write a program for the following .. I have tried, but I do not know where I'm going
To define the money in dollars, quarters and dimes, define the structure with the dollar quarterfimes with three simple variables, int dollars, int quarters and int dimes.
Add two dollars quarter dimes and submit the result to the third dollar quartersdams money.
Remember to make the necessary conversion to the dollar from the dimes and quarters Note: 10 dimes = 1 dollar and 4 quarters = 1 dollar
#include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; Typedef Structure {int dollar; Int Quarter; Int Dimes; } DollarsQuartersDimes; Zero Main () {dollarsQuartersDimes Input 1, Input 2, Total; Printf ("Please put money into dollars: quarter: dimes!"); Scanf ("% d% d% d", & amp; input 1 dollars, & amp; input1.quarters, & amp; input1.dimes); Printf ("Order again in Order Dollar: Quarter: Dimes!"); Scanf ("% d% d% d", & input2.dollars, and input2.quarters, and input2.dimes); Input1.dollars = input1.dollars + (input1.quarters / 25) + (input1.dimes / 10); Input2.dollars = input2.dollars + (input2.quarters / 25) + (input2.dimes / 10); Total. Dollars = input1.dollars + input2.dollars; Printf ("Total value in dollar:% d", total USD); }} Error: I'm getting the error that the return type error is not int. Please be declared as Code> Integer : main
int main (int argc, char * argv []) {// ... back 0; }
Comments
Post a Comment