I've been tasked to do 2 questions. I think i got the majority of it done, but i'm having trouble.
Question #1:
Write a C program that accepts as input from the keyboard a floating point number, an integer, and a character. Each of these inputs should be preceded by a prompt and stored using individual variable names. Have your program call a function that assembles the input data into a single string. Display the assembled string using...
User Profile
Collapse
-
Some Help Please with Strings and Structures
-
i just emailed my instructor to further clarify the question. The question was copied and pasted from my syllabus. THANKS for your time and help -
Homework help.
I was wondering if someone can help me with my homework. here's the assignment:
a. Write a C program that has a declaration in main() to store the string "What's for lunch?" into an array named message. There should be a function call to restaurant() that accepts the message as an argument named menu and then displays the message using the pointer notation *(menu + i).
b. Modify this restaurant() function to...Last edited by AdrianH; May 29 '07, 01:28 PM. Reason: Please use [code=c][/code] tags to improve readability. -
i don't quite follow. you have to understand i'm totally clueless about programming.Leave a comment:
-
Yes you are RIGHT, i did have some spelling differences between quarters, nickels, dimes, and pennies. hehehehe
here are some of the errors that i got after i corrected spelling and changed the commas to semicolons:
C:\Documents and Settings\T\Desk top\Work\Classe s\assignments\W A-3\Coins.c In function `change':
20 C:\Documents and Settings\T\Desk top\Work\Classe s\assignments\W A-3\Coins.c syntax error before "value"...Leave a comment:
-
Coin Counting Help
Hey there i was wondering if someone can help me with my program. I thought i had it down...but i'm having some problems. Here's the assignment.
Write a C function named change() that accepts a floating point number of total coins and the addresses of the integer variables named quarters, dimes, nickels, and pennies. The function should determine the number of quarters, dimes, nickels, and pennies in the total coins number passed to...Last edited by sicarie; May 11 '07, 01:57 PM. Reason: Please use [code] and [/code] tags around your code. Thanks! -
OH MYGOD...thank you SOOOOOOOOOOOOOO OO much.
how did you figure it out? that way i'll be able to figure it out later on my own. thanks again!!!Leave a comment:
-
here's the whole thing.
# include <stdio.h>
int main()
{
int year, test4, test100, test400;
printf("The amazing leap year teller thingie thing!!!\nPleas e enter the year to be tested: ");
scanf("year");
test4 = year%4;
test100 = year%100;
test400 = year%400;
if((test4 == 0 && test100 != 0) || test400 == 0)...Leave a comment:
-
i tried that...and now after entering a year the program crashes.
thanks the idea still :)Leave a comment:
-
Leap Year
Hey there...i was wondering if someone can help me with my program. I'm doing the leap year program thing. i thought i had it all figured out, but it ALWAYS says that it's not a leap year. here's my code...if you can help i'd gladly appreciate it.
int year, test4, test100, test400;
printf("The amazing leap year teller thingie thing!!!\nPleas e enter the year to be tested: ");
scanf("year");
...
No activity results to display
Show More
Leave a comment: