Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
largest
- Page 1
Re: Largest odd number in a array help
Programming
Software Development
14 Years Ago
by spetro3387
…[CODE]//File: lab8a.cpp /*Purpose: to find the
largest
odd number in a 50-element array of integers.*/ … values into array void largestOdd(int[],int&); //find
largest
odd number void main() { ins.open(in_file); //open…(B[i] % 2) == 1) && (B[i] >
largest
) )
largest
= B[i]; } int main(){ int number[] = {1,2,3,4…
largest and 2nd largest numbers
Programming
Software Development
16 Years Ago
by gabec94
… > largestSoFar){ largestSoFar = number; } if (count == 9) {
largest
= largestSoFar; System.out.println(
largest
); } if (number <=
largest
){ if (number > secondLargest){ secondLargest = number…
Largest odd number in a array help
Programming
Software Development
14 Years Ago
by hq1
…[CODE]//File: lab8a.cpp /*Purpose: to find the
largest
odd number in a 50-element array of integers.*/ #…input values into array void largestOdd(int[],int&); //find
largest
odd number void main() { ins.open(in_file); //open …i++; } return; } void largestOdd(int B[50], int&
largest
) { int i = 0; ins >> B[i];…
Re: Largest odd number in a array help
Programming
Software Development
14 Years Ago
by spetro3387
…. void largestOdd(int *B, int sizeB, int&
largest
) So your code would look like: [CODE] void largestOdd…(int *B, int sizeB, int&
largest
){ for(int i = 0; i < sizeB; i++) if(… (B[i] % 2) == 1) && (B[i] >
largest
) )
largest
= B[i]; } int main() { ins.open(in_file); //open file int…
Re: Largest odd number in a array help
Programming
Software Development
14 Years Ago
by spetro3387
…/data.txt" using namespace std; //assuming
largest
was set to zero void largestOdd(int *B,…[i] % 2) == 1) && (B[i] >
largest
) )
largest
= B[i]; } int nReadFile1(int *Array){ ifstream fin(FILE_LOC); string…int x[50]; //array to hold 50 elements int Size,
Largest
= 0; //Size = nReadFile1(x); Size = nReadFile2(x…
Re: largest and 2nd largest numbers
Programming
Software Development
16 Years Ago
by gabec94
… { public static void main(String[] args) { int number; int
largest
= 0; int largestSoFar = 0; int secondLargest = 0; Scanner …System.out.print("------------------------ \n"); } System.out.printf("
Largest
# = " +
largest
+ "\n"); System.out.printf("Second…
Re: largest and 2nd largest numbers
Programming
Software Development
16 Years Ago
by masijade
… this, of course, will be removed [code] if (number <
largest
){ if (number > secondLargest){ number = secondLargest; } } [/code] You can also… remove all current references to "
largest
" and then rename "largestSoFar" to "…
Largest c#
Programming
Software Development
13 Years Ago
by D19ERY
…string[] args) { int [] numbers = new int[10] ; int
largest
= 0; for (int I = 0; I <= 9; …[I] >
largest
)
largest
= numbers[I]; } Console.WriteLine("The
largest
number entered is " +
largest
.); Console.ReadLine();//Reads …
largest,smallest
Programming
Software Development
14 Years Ago
by churva_churva
…=Math.min(smallest,arr[i]); return smallest; } public int
largest
(){ int
largest
=0; for(int i=0;i<arr.length;i…++)
largest
=Math.max(
largest
,arr[i]); return
largest
; } public int sum(){ int sum=0; for…
Largest and Smallest number problem
Programming
Software Development
15 Years Ago
by BuhRock
… main(String[] args) { int numbers; int smallest = 0; int
largest
= 0; int count = 0; int val; int testNum = -99…("Enter number "); val = keyboard.nextInt(); if (val >
largest
) {
largest
= val; } if (val < smallest) { smallest = val; } } …
largest , second largest and third largest.
Programming
Software Development
13 Years Ago
by masterjohji
… given to me by my classm8 which tells the
largest
, 2nd
largest
, 3rd
largest
and smallest number. but I can't understand how…
Re: largest integer in a char
Programming
Software Development
13 Years Ago
by WaltP
… the [B]3 CHAR[/B] and prints the
largest
one. [/QUOTE] [QUOTE=meli123;]I have used …}; // create the array, all defined as 0 char
largest
= 0; // create the '
largest
' value -- as 0 cin >> num;…(i=0; i<10; i++) { if (
largest
< num[i]) {
largest
= num[i]; // replace with the larger value …
Re: Largest c#
Programming
Software Development
13 Years Ago
by Antenka
You're comparing your number with
largest
to obtain the
largest
one ... What are the positive numbers - the numbers, which are bigger than 0 ..
Re: largest,smallest
Programming
Software Development
14 Years Ago
by javaAddict
First of all, the methods for smallest,
largest
are wrong. You initialize at both cases with zero. For … with the other method. You need to initialize the smallest/
largest
variable with the first element of the array. As far…
Largest Prime Factors
Programming
Software Development
16 Years Ago
by SallyJ
… digit length of n2. (E) Calculate and display n5 = the
largest
prime factor of n3+n4. A prime factor of integer… etc). For example, 3 is the
largest
prime factor of 27 and 7 is the
largest
prime factor of 49. And this…
Re: Largest Prime Factors
Programming
Software Development
16 Years Ago
by JasonHippy
…n4 << endl; // calculate and output the
largest
prime factor. n5=largest_prime_factor(n3+n4); cout <<… "The
largest
prime factor is: " << n5 …so return digit_length... return digit_length; } // calculate
largest
prime factor of passed-in int value int largest_prime_factor(…
Largest and smallest number
Programming
Software Development
13 Years Ago
by Ashenvale
… hold the current number float max; //variable to hold the
largest
number float min; //variable to hold the smallest number int… System.out.println("******************************"); System.out.println("The
largest
number is " + max); System.out.println("The smallest…
Re: Largest Prime Factors
Programming
Software Development
16 Years Ago
by JasonHippy
…, this function is supposed to be calculating and returning the
largest
prime factor of the passsed in number.... // so you should…: [CODE=C++] int largest_prime_factor(int a) { // todo: insert code for
largest
prime factor algorithm here //(return 0 for now until new…
Re: Largest Prime Factors
Programming
Software Development
16 Years Ago
by threat
… move on to next number } cout<<"\nthe
largest
prime factor of n3+n4 is\n" <<…;n5; //the last factor in prime factorization is always the
largest
getch(); }[/code]
Re: Largest Prime Factors
Programming
Software Development
16 Years Ago
by threat
…;0) {h++;} else {i/=h;} } cout<<"the
largest
prime factor in this case is" <<h…
Largest number with entry
Programming
Software Development
15 Years Ago
by zeus1216gw
… user to input 5 numbers and it'll display the
largest
number and whether it was the 1st, 2nd 3rd...so… _tmain() { cout << "This program will find the
largest
number of " << MAXNUMS << " numbers…
Re: Largest number with entry
Programming
Software Development
15 Years Ago
by siddhant3s
… | 8 | |___|___|____|____|___|[/code] We find the
largest
number by the following algorithm: Algorithm to find the maximum… to Step 2 Hence you get the MAX as the
largest
value. Always post your code in the post tags: [noparse…
Largest/Smallest element of a vector?
Programming
Software Development
15 Years Ago
by scantraXx-
Hey guys. I'm having trouble getting the
largest
/smallest value of an element in a set I created …from my class. It has to return the
largest
/smallest element of specific elements that are set to true…
Largest 2 Numbers
Programming
Software Development
14 Years Ago
by mebob
… a program that takes 4 inputs and outputs the 2
largest
inputs. So I wrote this code, [CODE] #include <iostream…; input[3]; largest_two ( input, output ); cout << "The
largest
two of the numbers you entered are " <<…
largest integer in a char
Programming
Software Development
13 Years Ago
by meli123
I would like to make a program which allows you to enter a number (say 145). It reads the 3 CHAR and prints the
largest
one. I can make it to compare integers but where I am lost is how to compare characters in a single 145 (example) input so input 145 [enter] print 5 (
largest
#) thats what I basically want to do
Largest number in an array
Programming
Software Development
13 Years Ago
by techyworld
…[i]) { max=list[i]; } } index=max; System.out.println("
largest
: "+index); } } public class Arrayint { public static void main(String…[i]) { max=list[i]; } } index=max; System.out.println("
largest
: "+index); } }[/CODE]
Largest Palindrome - Product of 3 Digits Nos.
Programming
Software Development
12 Years Ago
by Sanjam.kumar
I made this program which had to calculate the
Largest
Palindrome which being the product of two 3-Digit Numbers. …;<endl; } if(r==d) break; } cout <<"
Largest
Palindrome is : " <<d; getch(); } It runs for…
Re: Largest number with entry
Programming
Software Development
15 Years Ago
by nirav99
… swapping & comparing every element of a[5] get the
largest
number. see in my programm... #include<iostream.h>…
Re: Largest number with entry
Programming
Software Development
15 Years Ago
by nirav99
… swapping & comparing every element of a[5] get the
largest
number. see in my programm... #include<iostream.h>…
Re: largest sum in a triangle of nos.
Programming
Software Development
15 Years Ago
by siddhant3s
… 99 12[/code] say for 15, the path with the
largest
sum would be the one containing the 35. So you… row of the previous triangle). Ultimately you will get the
largest
sum possible.
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC