Search:

Type: Posts; User: hobolux

Search: Search took 0.00 seconds.

  1. I want him to enter "text\n" "text\n"...

    I want him to enter
    "text\n"
    "text\n"
    "text\n"
    "\n" // type this to exit
    3 // output if all 3 sentences are palindromes
  2. Problem with limiting inputs of char functions

    #include <stdio.h>
    #define MAX_INPUT_LENGTH 80

    int is_palindrome(char []);

    int main(void)
    {
    int i = 0, indicator = 0;
    char words[MAX_INPUT_LENGTH] = {'a'};
  3. Replies
    16
    Views
    3,551

    Ok. I will keep that in mind.

    Ok. I will keep that in mind.
  4. Replies
    16
    Views
    3,551

    oh no. no wonder! i thought 5%10=0! Thanks a...

    oh no. no wonder! i thought 5%10=0!

    Thanks a lot.
  5. Replies
    16
    Views
    3,551

    int sum_digits(int number) { int remainder,...

    int sum_digits(int number)
    {
    int remainder, sum_int;

    while(number!=0 && remainder!=0)
    {
    sum_int= sum_int+ number- number/10*10;
    number= number/10;
    remainder=sum_int%10;
  6. Replies
    16
    Views
    3,551

    ok i just started learning C and I only used the...

    ok i just started learning C and I only used the compiler gcc in ssh secure shell client to see the errors to debug or use the printf statement.
  7. Replies
    16
    Views
    3,551

    while (number > 9) number = number % 9; ...

    while (number > 9)
    number = number % 9;

    if (number == 0)
    return (9);
    return number;[/QUOTE]


    Thanks it works much better!
  8. Replies
    16
    Views
    3,551

    Why doesn't this c program work?

    * This program is designed to print a Fortune Cookie
    * message for a positive integer entered by the user.

    #include <stdio.h>

    int sum_digits(int);
    void print_cookie(int);

    int main(void)...
Results 1 to 8 of 8