Ken smith

Greenhorn
+ Follow
since Jun 01, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ken smith

Thanks for responding to my posting. I've modify the code as seen below. The error message is gone. Does anyone knows what the n in the problem above means? On Given number n = .... What does the n stands for? Thanks in advance


17 years ago
I'm trying to resolve this problem.

Numbers whose sum of digit divible by 3 represent number divisible by 3.

Write a program to verify this famous statement.
Input a 5-digit interger n from the keyboard.
Find the sum of digits. Call it sum.

Verify the either (a)both n and the sum are divisible by 3 or (b)both are indivisible by 3.

Your output is:

Given number n = ...
Print one of the following three statement:

(a)Both n and sum are divisible by 3.
(b)Both n and sum are indivisible by 3.
(c)The famous statement is wrong

I'm getting Incompatible type error when I run the code below on if(g = 0).




My questions are:

1) on if(g = 0), I thought 0 is a int. What is wrong with g = 0.

2) How do I capture n in a variable and test if it divisible by 3. For example: if I type in 58973 on the key borad, I would like to capture this intergers in a variable. Does anyone knows what's happening here. Please help


Regards

Ken
17 years ago
You can start by working on this problem. Please make sure you post the code. Thanks

I have to write a program that inputs 5 dogit integer from the keyboard and print if the input is a palindrome or not.

Example

12921 is a palindrome.
12923 is not palindrome
17 years ago
Rusty,

You sound like a nice individual. I understand you genuinely love java programming and want to help people study it the right way. I'm taken java programming for quiet a few reasons; get college credit and maybe use the knowledge to write little scripts in other platforms. I have absolutely no desire to becoming a java programmer or any type of programmer in general. I've been working as a SQL Sever DBA for about fifteen years now. I've been writing T-SQL scripts for a long as I can remember. Currently, I'm sick of any technical related careers. The reason I'm trying to finish my degree program is just so I can go to law school.
Again, I'm doing my best to study and understand java programming, but my instructor suck. Regard Ken
17 years ago
If there is any guru out there, all I need is a solution to my problem. Not links to some study materia. As I said earlier, I've red lots of java intro documents. If you know how to code in jave please help.
17 years ago
Here is the code that I've written. I'm trying to test if the y variable is a palindrome or if it's not. As you guys can see, I'm trying. Please help. Regards Ken

17 years ago
I'm not trying to get people to do my home work for me. I just need help resolving this problem. I've red several documents regarding the topic; however, I'm still having problems. Any help would be greatly appreciated.
Regards

Ken
17 years ago
I have to write a program that inputs 5 dogit integer from the keyboard and print if the input is a palindrome or not.

Example

12921 is a palindrome.
12923 is not palindrome


Can someone please with this problem. I'm new to this game. Thanks in advance.
17 years ago