Search Results

Showing results 1 to 11 of 11
Search took 0.01 seconds.
Search: Posts Made By: Chaster ; Forum: C and child forums
Forum: C Feb 18th, 2009
Replies: 2
Views: 395
Posted By Chaster
Well, we are not supposed to do your homework, but here is some code you can use as starting point. So, the code for the recursive input:
void readA(int A[]){
if (nr>0) {
...
Forum: C Oct 22nd, 2008
Replies: 4
Views: 502
Posted By Chaster
I've compiled and run it without problems;
Enter the number corresponding to ... : 1
Please enter the number of ... : 40
Output:
Gross Pay - 365.50
Payable Tax - 58.10
Net Pay - 307.40

Which...
Forum: C Oct 22nd, 2008
Replies: 2
Views: 418
Posted By Chaster
You could try a double variable, like this:


for (float c=0.0;c<2.1;c+=0.02) {
...
}

Inside that for, you compute the values for your function, then you save these...
Forum: C Aug 13th, 2008
Replies: 11
Views: 1,904
Posted By Chaster
Right... If he/she cannot even describe what the problem is...;)
Forum: C Aug 13th, 2008
Replies: 11
Views: 1,904
Posted By Chaster
How do you store the information? (I mean in the memory, in a text file, database?) Different solutions for different approaches... And also, you should post some code, so we can help you without...
Forum: C Aug 12th, 2008
Replies: 3
Views: 846
Posted By Chaster
As far as I can remember, a c header file cannot contain implementation, only functions' signature. You declare your functions and constants in the header file. The implementation is done in that...
Forum: C Aug 12th, 2008
Replies: 6
Views: 640
Posted By Chaster
Well,
static means (at least in Java, but I think it's the same) that you don't need to create an instance of that class, you can access that method directly: ClassName.methodName([params]).
void...
Forum: C May 31st, 2008
Replies: 7
Views: 1,035
Posted By Chaster
Use Lex and Yacc (or Bison) to make your life easier.
Forum: C Jun 15th, 2007
Replies: 8
Views: 6,717
Posted By Chaster
Just an idea:
Two words are usually separated by " "(SPACE). So, you have a string, containing some words. Now you start from the end of the string, and put the character into a new string's 0th...
Forum: C Jun 15th, 2007
Replies: 7
Views: 1,213
Posted By Chaster
So, assuming you aren't using arrays with thousands of elements, you can use this

do
swap = 0;
for (int i=0;i<n-1;i++) // n- nr of elements
if (anArray[i]>anArray[i+1])
{
...
Forum: C Jun 15th, 2007
Replies: 4
Views: 2,260
Posted By Chaster
#include <stdio.h>

int main()
{
char drinkchoice; //gives drinkchoice a named character to be recognized
float insert= 0.00; //This allows the insert function to be used throughout...
Showing results 1 to 11 of 11

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC