homeworkhelp Programming Software Development by mitchelltab he is what the home work should be. [COLOR=#000000][B][I]Programming Assignment [/I][/B][/COLOR] [CENTER][CENTER][COLOR=#000000][B]CS 320 - Homework Program #1 [/B][/COLOR] [COLOR=#000000][B][I]Due: Sunday, at the end of Week #2 [/I][/B][/COLOR][/CENTER][/CENTER] [COLOR=#000000]Write a program to compute a student’s tuition for one semester, … Re: homeworkhelp Programming Software Development by Lerner I'd say you're on the right track but: 1) please place code posted to this board inside code tags to preserve indentation. If your code truly looks like that, then please learn how to indent. 2) Your instructor put this [quote] remember to develop and test your code one section at a time. [/quote] in the instructions for a reason. I'm … Re: homeworkhelp Programming Software Development by mitchelltab ok that make a little more since. But it looks like my while loop is off. Is there something wrong with that as well. Re: homeworkhelp Programming Software Development by Lerner Be as consistent as you can with your coding style. For example, if you capitalize the first letter of a "variable" that's been defined then do it for every "variable" declared with a define. If you place the opening curly brace on the same line as the loop keyword or the if/else conditional, then do it for every loop keyword … Re: homeworkhelp Programming Software Development by mitchelltab This is the program that i have come up with so far. But for some reason it is stuck in a loop. And i'm lost as in to if it should olny be one out put. Or should the out put be for all of the number that you entered. [code] #include <stdio.h> main () { #define flatfeeone 500.00 /*flat rate for up to 6 credits*/ #define Flatfeeu 450.00 /*rate… Re: homeworkhelp Programming Software Development by Lerner Again, I hope it's the board is screwing up your indentation because the second program you posted looks ugly(!) and is very difficult to read. Please, if you are going to declare main() with return type void, then don't use a return statement. You'd be much better off declaring main with return type int though. (int main(){......return 0;})… Re: homeworkhelp Programming Software Development by ~s.o.s~ Please try and understand the code given below and ask if you have doubts regarding it and try to write the code once again on your own. Maybe this is what you were looking for : [code] [COLOR=#0000ff][/COLOR][COLOR=#000000][/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] <stdio.h>[/COLOR] [COLOR=#0000ff]const[/COLOR][COLOR=#000000… Re: homeworkhelp Programming Software Development by mitchelltab this just seems like it is a lot longer. but it dose the same thing. THe code that i wrote. Was any of it going in the correct direction. Or is this just another way to write the same thing. I see that you used a lot more floast and did not do any defines. ANd i also see that you did not use a while statement. Can you explain that to me. Re: homeworkhelp Programming Software Development by Lerner ~sos gave a solution that does basically what you do except that it uses multiple functions instead of a single function. At least in C++, it is my understanding that const variables are prefered to defines, but I'm not sure if the same holds in C or not. ~sos does a little more error checking, and uses switch statements instead of changing input… Re: homeworkhelp Programming Software Development by ~s.o.s~ [quote=mitchelltab]this just seems like it is a lot longer. but it dose the same thing. THe code that i wrote. Was any of it going in the correct direction. Or is this just another way to write the same thing. I see that you used a lot more floast and did not do any defines. ANd i also see that you did not use a while statement. Can you explain … Write a method DisplayDigits that separates digits by spaces (HomeworkHelp) Programming Software Development by mslittle1 I need help with my homework assignment. The assignment is write a method DisplayDigits that receives an integer between 1 and 99999 and displays it as a sequence of digits, separating each pair of digits by two spaces. For example, 4562 should appear as 4 5 6 2 I have tried several ways but all of them failed. I'm new to C#. *Attempt 1.*… Re: Write a method DisplayDigits that separates digits by spaces (HomeworkHelp) Programming Software Development by Momerath 1. Convert the number to a string. 2. Realize that a string can be treated as an array of characters. 3. Profit! Re: Write a method DisplayDigits that separates digits by spaces (HomeworkHelp) Programming Software Development by tinstaafl Your second attempt came close. see if this helps. static void Main() { string numbers; Console.Write("Enter a number between 1 and 99999: "); numbers = Console.ReadLine(); DisplayDigits(numbers); } public static void DisplayDigits(string numbers) { foreach (… Re: Write a method DisplayDigits that separates digits by spaces (HomeworkHelp) Programming Software Development by mslittle1 Thank you, tinstaafl and Momerath. I didnt know I could use numbers.Length for strings. Now, I do. :) Thanks again for your help in teaching me something new.