User Profile

Collapse

Profile Sidebar

Collapse
thefarmer
thefarmer
Last Activity: Mar 30 '08, 06:32 AM
Joined: Nov 15 '06
Location: Antipolo, City
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • hi there,

    actually you can use either ways, but find codes that it may feel you comfortable to use, if i were writing your program data stuctures are more convinient like struct.

    regards,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Not clear on the use of break statements
    in C
    in some ways your command of placing your break statement is correct but, your if statement is lacking of idea how the break statement will terminate it,

    you can try:

    if ( count <=0)
    {
    break;
    }

    then this will work, but in your idea of using " if (count)" , it shows that the compiler doesn't know how will he herminate your command....
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to help required
    in C
    hi there,

    perhaps you should post something first, your question should have to be at base 11 but how do we solve that, whats the real story of this base 11, post something, ok

    regards,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Help With C Programming
    in C
    hi there,

    skills can be improve by time, effort, resourcefulness and self steem, i suggest you to read, search and solve some problems in c, and then analyze how that problems work out, read some problems from reliable websites, and study again, ask question on some forums like this on things you don't understand...ok

    goodluck!!!!!!!


    regards on your contest......
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Help me in completing a program
    in C
    hi there,

    it seems that we are very willing to help you, but for now i strongly suggest that you post something, coz some people here are too busy to encode codes from the scratch, so post something and we'll see..
    ok

    regards,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to i need a simple code?
    in C
    hi there,

    hope this might be of help!!!!

    #include <iostream>
    using namespace std;

    long factorial (long a)
    {
    if (a > 1)
    return (a * factorial (a-1));
    else
    return (1);
    }

    int main ()
    {

    long number;
    cout << "Please type a number: ";
    cin >> number;...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Using Switch statement
    in C
    hi there,

    actually you can code that using case statement, but i also prefer using if else ,co'z for me that would become more easy to read, but you can try that, what does you have so far....

    regards,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Hello everyone.. I need help!
    in C
    hi there,

    there are so many methods to do that but unfortunately we don't see any code fron you that people can anlyze what you are trying to say.. so pls post something ,i believe that would help you and would help us too...

    regards,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Euclid's Algorithm
    in C
    hi there,

    i think your program needs to get the greatestcommon denominator of two numbers right, your program seems that it would not run even you arrange this code
    y:= x-y and x:=y-x

    you should change that ok...


    but anyways try this one i think this would help you:

    #include<stdio. h>

    int main()
    {
    int a,b,n,GCDnum=0, num;
    printf("enter...
    See more | Go to post

    Leave a comment:


  • hi there,

    i think your error is in within your switch file , co'z you'd always closing it , look at this line:

    switch(num)
    {
    case 1:
    sum = 0;
    Hotel = 1;
    for (Months = 0; Months < MONTHS; Months++)
    {
    sum = sum + totalguests[Hotel][Months];
    }
    cout<<"Yearly Total: "<<sum<<end l;
    }
    return 0;
    }

    ...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to i need some explanation, pls help
    in C
    hi i just want the meaning of n [ i ]and the relation of letter i to n on this

    scanf("%d",&n[i]);

    and the letter j to n on this,

    if (n[j] >=90)

    thanks,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Root problem
    in C
    hi there,

    i ca'nt code for you right now so i'd advice you to see some websites, with programs sample??

    ok,

    regards,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to arrays
    in C
    hi there,

    An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.
    where each blank panel represents an element of the array, that in this case are integer values of type int. These elements are numbered from 0 to 4 since in arrays the first index is always 0, independently of its length.
    Like a regular variable,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Infiles and Arrays
    in C
    hi there,

    can you post your program, so people ca analze your problem??

    regards,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Arrays- Please help!
    in C
    hi there,

    Like a regular variable, an array must be declared before it is used. A typical declaration for an array in C++ is:

    type name [elements];// int mike [5];

    where type is a valid type (like int, float...), name is a valid identifier and the elements field (which is always enclosed in square brackets []), specifies how many of these elements the array has to contain. that means you can declare...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Have A Look Here
    in C
    hi there,

    i think you should post your questions on the HTML forum.....

    regards,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Question on structure
    in C
    the scope of variables declared within a function or any other inner block is only their own function or their own block and cannot be used outside of them.

    #include <iostream.h>

    int integer -----------
    char aCharacter; // this ------------- first four are global variables
    char string [20]; -------------
    unsigned int YourNumber; ...
    See more | Go to post

    Leave a comment:


  • hi there,

    in your header put " #include <string.h>, and you do'nt have any declaration in your sum function, coz in your

    code: sum = sum + score [i]; // how will you get the input "sum" i suggest to create some formula for it.


    regards,...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to examples?
    in C
    hi there,

    as you know there are lots of programming language that we people can use, but as an advise, i think you'd better stick on one language first before going or change to other language, C++ is a more challenging language than other language, if you can prove that you may become good C++ coder i think it will become more easy for you to study other language like what you've said..


    goodluck!!!!!!!
    ...
    See more | Go to post

    Leave a comment:


  • thefarmer
    replied to Question on structure
    in C
    hi there,

    your statement "strcpy(variabl e[0].name,"name");" was declared outside to the beginning of the definition of the main function. The main function is the point by where all C++ programs start their execution, independently of its location within the source code. It does not matter whether you declare other functions with other names defined before of after it - the instructions contained within this function's...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...