15,891,908 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by verma.9878528979 (Top 7 by date)
verma.9878528979
11-Jan-13 0:14am
View
tags is not my problem ,the logic is.I want to make it my self but can't get the logic how to do it. all i need is an idea so i can make it.c++ always helps!!!!
verma.9878528979
11-Jan-13 0:04am
View
there a random values for example salary of 30 employee, the data in the salary will be in any order and i think shorting will not wrk in this condition. i have to find random highest values it can be 2nd or 3rd or 5th etc i have created an program in c#.net where output shows in lable but it only shows the 2nd largest
{
int[] arr = { 10, 25, 45, 12, 30, 85, 14, 75, 89 };
int temp, f, s, t;
f = s = t = arr[0];
foreach (int i in arr)
{
if (f < i)
{
temp = f;
f = i;
t = temp;
}
if (s < i && f > i)
{
temp = i;
s = i;
t = temp;
}
if (t < i && s > i)
{
temp = i;
t = i;
}
}
Label1.Text = t.ToString();
}
i want to give input for nth term like i want to see 5th largest or the 3rd largest.
verma.9878528979
10-Jan-13 23:57pm
View
the values will not be arranged so i don't think shorting works here..
verma.9878528979
10-Jan-13 23:56pm
View
All i need is a simple example in c++ so i can understand the logic behind the program.
verma.9878528979
10-Jan-13 23:53pm
View
guys. all i wana know the logic behind the loop to find nth term i have created a simple program in ASP.net. which shows the 2nd largest from an array but i want to input multipal values and then any nth term..n yes let me tel you one thing it's not homework i need it for a project. here what i have done :
{
int[] arr = { 10, 25, 45, 12, 30, 85, 14, 75, 89 };
int temp, f, s, t;
f = s = t = arr[0];
foreach (int i in arr)
{
if (f < i)
{
temp = f;
f = i;
t = temp;
}
if (s < i && f > i)
{
temp = i;
s = i;
t = temp;
}
if (t < i && s > i)
{
temp = i;
t = i;
}
}
Label1.Text = t.ToString();
}
now this program finds the 2nd largest but i need to give random input for the nth largest term. it can be 2nd , 3rd, 5th or even 8th largest value... help!!!
verma.9878528979
10-Jan-13 12:31pm
View
thnks, But i want to use it in my project am wrking on. I just want an simple idea how to use loops and conditions in it... can you help.
verma.9878528979
10-Jan-13 12:29pm
View
No it's not homework... I am doing an project in ASP.NET in c#.net ... all i want is an idea how it works in c++ so that i can use the logic ..... ntin else ....
Show More