We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,613 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

finding integer

Hello everyone i need help with this task :
"Write an expression that checks for given integer if its third digit (right-to-left) is 7. E. g. 1732 -> true"

3
Contributors
4
Replies
1 Hour
Discussion Span
9 Months Ago
Last Updated
5
Views
thechampp
Newbie Poster
11 posts since Jul 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Hi,
As a general rule we don't do your homework for you. If you have made a fair attempt at the question, show us how far you got and we'll nudge you in the right direction. For example, for your question, what have you tried or what do you think will be a good solution? Show us you've made some effort and we'll be more likely to help.

hericles
Veteran Poster
1,065 posts since Nov 2007
Reputation Points: 156
Solved Threads: 228
Skill Endorsements: 9

What have you managed to do so far ? Can you post it in this thread so we can see if you're on the right track and try to help is we can ?

ChrisHunter
Posting Pro
566 posts since Feb 2011
Reputation Points: 104
Solved Threads: 51
Skill Endorsements: 13

i have only this, but the main part (finding the third digit i don't have an idea,thinking about 2 hours) is difficult to find the solution.

Console.WriteLine("enter a number"); 
int number; 
string c; 
c = Console.ReadLine(); 
bool check = int.TryParse(c, out number); 
while (check == false) 
{ 
Console.WriteLine("please enter a valid number"); 
c = Console.ReadLine(); 
check = int.TryParse(c, out number); 
}
thechampp
Newbie Poster
11 posts since Jul 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

i found solution, solved. Thank you anyway! :)

thechampp
Newbie Poster
11 posts since Jul 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0609 seconds using 2.64MB