I want him to enter
"text\n"
"text\n"
"text\n"
"\n" // type this to exit
3 // output if all 3 sentences are palindromes
Type: Posts; User: hobolux
I want him to enter
"text\n"
"text\n"
"text\n"
"\n" // type this to exit
3 // output if all 3 sentences are palindromes
#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'};
Ok. I will keep that in mind.
oh no. no wonder! i thought 5%10=0!
Thanks a lot.
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;
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.
while (number > 9)
number = number % 9;
if (number == 0)
return (9);
return number;[/QUOTE]
Thanks it works much better!
* 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)...