Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
smallest
- Page 1
Re: Change-a-Letter-or-Two-Game
Community Center
Geeks' Lounge
16 Years Ago
by mitrmkar
smallest
Smallest, Largest & Sum of 5 numbers
Programming
Software Development
14 Years Ago
by clarence_cool03
{-='
Smallest
, Largest & Sum of 5 numbers using Dev-C LaNGuaGe'=-}
Re: Java help
Programming
Software Development
13 Years Ago
by JamesCherrill
Smallest
= Math.min(
Smallest
,a); If
Smallest
is -99999 then for any value of a >= 99999 this will return -99999. Not quite what you need. Like I said before: Best to initialise it to the [B]largest [/B]valid int value.
Re: Smallest, Largest & Sum of 5 numbers
Programming
Software Development
12 Years Ago
by arindam31
…]) sml = arr[i]; } printf("[COLOR="red"]The
smallest
number is %d\n[/COLOR]",sml); }[/CODE]
Smallest number from user input
Programming
Software Development
13 Years Ago
by Bri426
…end, the program computes the sum, average, largest number and
smallest
number. I've got the entire program figured out, but…for hours trying to figure out how to compute the
smallest
number and it's driving me crazy. Can someone …int sum = 0; float average = 0; int largest = 0; int
smallest
= 0; cout << "How many numbers do you…
Re: Smallest number from user input
Programming
Software Development
13 Years Ago
by StuXYZ
… correctly for the largest BUT report 0 for the
smallest
. The problem here is that you have assumed that… the largest and
smallest
number cannot occur together. Same problem exists if you… i=0;i<UserInput;i++) { if (!i ||
smallest
>number)
smallest
=number; } [/code] Yes it adds an extra test. …
smallest and largest values help
Programming
Software Development
12 Years Ago
by meme dreame
… values are the same the largest same as the
smallest
i would like just some help or hints comment… enter your first value"); int val = input.nextInt(); int
smallest
= val; int highest = val; for (int count = 0; count…highest value is %d",val); if (val <
smallest
)
smallest
= val; System.out.printf("the lowest value is %d…
Re: Smallest number from user input
Programming
Software Development
13 Years Ago
by gju
u have already declared the
smallest
=0 so if the user enter all the number greater than 0 u will get 0 as your output so assign
smallest
as the first number given by user and change the condition if by if(number<=
smallest
) {
smallest
=number } reply me if it works
Re: smallest and largest values help
Programming
Software Development
12 Years Ago
by meme dreame
…I assigned "maximum" to your "
smallest
" and "minimum" to your &…your first value"); int val = input.nextInt(); int
smallest
= Integer.MAX_VALUE; int highest = Integer.MIN_VALUE; for (…quot;the highest value is %d",
smallest
); if (val <
smallest
)
smallest
= Integer.MAX_VALUE ; System.out.printf("…
Re: smallest and largest values help
Programming
Software Development
12 Years Ago
by meme dreame
… enter your first value"); int val = input.nextInt(); int
smallest
= Integer.MAX_VALUE; int highest = Integer.MIN_VALUE; for (int count = 0….out.printf ("the highest value is %d",
smallest
); if (val <
smallest
)
smallest
= Integer.MAX_VALUE ; System.out.printf("the lowest…
Re: Smallest number from user input
Programming
Software Development
13 Years Ago
by chococrack
[CODE][B]if number <
smallest
smallest
= number[/B][/CODE]
Re: smallest and largest values help
Programming
Software Development
12 Years Ago
by Taywin
… to create variables. 2)When you initial a value of
smallest
& highest, you need to initial it to the maximum… you use integer, so the values could be... [CODE] int
smallest
= Integer.MAX_VALUE; int highest = Integer.MIN_VALUE; [/CODE] If you are… highest value from user inputs. The same applies to the
smallest
value.
Re: smallest and largest values help
Programming
Software Development
12 Years Ago
by meme dreame
…to create variables. 2)When you initial a value of
smallest
& highest, you need to initial it to … you use integer, so the values could be... [CODE] int
smallest
= Integer.MAX_VALUE; int highest = Integer.MIN_VALUE; [/CODE] If … value from user inputs. The same applies to the
smallest
value.[/QUOTE] yes i tried it but it gave …
Re: smallest and largest values help
Programming
Software Development
12 Years Ago
by Taywin
[QUOTE]another question why you put Integer.max_value and same to the min_value ? [/QUOTE] You need to go back and look at my post again... I assigned "maximum" to your "
smallest
" and "minimum" to your "highest." I also tried to explain why I did that... But the result shows that you are doing the opposite.
smallest interval timer offers
Programming
Software Development
16 Years Ago
by bisma
… bakground of c++ I wanted to know what is the
smallest
interval that we can have for timer...i've tried… the following code with
smallest
interval of 1 meaning 1 millisec but the timer doesnt…
Smallest array
Programming
Software Development
12 Years Ago
by herstein
… write a programme (not using scanner class) which prints the
smallest
number in an external text file called README.txt. Anyway… to stop as soon as this occurs and return the //
smallest
value in the array } }[/CODE]
smallest brower
Hardware and Software
Microsoft Windows
17 Years Ago
by whynot2000
i'm looking for the
smallest
browser on the web i've already found JBI Explorer (700kb), but it uses parts of IE7, so thats cheating
smallest largest
Programming
Software Development
15 Years Ago
by manzoor
how do you find the
smallest
and largest number of 3 numbers without using logical operators and else statement only if and relational operator ? is there any other way without checking every variable against each other using if statements ?
Re: smallest largest
Programming
Software Development
15 Years Ago
by twomers
…,4,9}; // using default comparison: cout << "The
smallest
element is " << *min_element(myints,myints+7) <…
Re: smallest largest
Programming
Software Development
15 Years Ago
by n1337
Errr...well, if you are dealing with positive integers only, you could construct a loop, then on each iteration through the loop, subtract one from each of the numbers, and the first one to reach 0 is the
smallest
; the last one to reach 0 is the largest... hahaha it models the recursive definition of a natural number, but don't do this...lol
Re: Smallest form app?
Programming
Software Development
10 Years Ago
by deceptikon
The
smallest
I can think of that doesn't enter the realm …
Finding the Smallest and Second Smallest Number
Programming
Software Development
12 Years Ago
by NickPatton
… input and then prints out the
smallest
and second
smallest
of those integers. The program correctly… Integers[i-1]; } } cout << "The
Smallest
Integer Entered is: " << Smallest_Value << …" and the Second
Smallest
is: " << Second_Smallest_Value << &…
Find the smallest number using while loop
Programming
Software Development
12 Years Ago
by civirol02
… static void main (String args[]) { int value = 0,number=0,
smallest
= 0; while (value<10) { value++; number = Integer.…;+value+":")); } if (number <=
smallest
)
smallest
=number; else
smallest
=
smallest
; String msg="The
smallest
number is :"+
smallest
; JOptionPane.showMessageDialog(null,msg); } }
Fining smallest values in Array
Programming
Software Development
11 Years Ago
by crazymidget01
…boolean array, then find the
smallest
, then next
smallest
, then next next
smallest
, etc values in the array … the boolean at the corresponding index to
smallest
value will be changed to true if …used in this method. public
Smallest
indexOfSmallest(int[] a, boolean[] b){
Smallest
x = new
Smallest
(); x.setSmallest(a[1]);…
Re: Fining smallest values in Array
Programming
Software Development
11 Years Ago
by crazymidget01
… int index; private int
smallest
; public
Smallest
(){ index = 0;
smallest
= 0; } public
Smallest
(int i, int s){ index = i;
smallest
= s; } public int getIndex(){ return…
Re: Fining smallest values in Array
Programming
Software Development
11 Years Ago
by corby
… your indexOfSmallest function public class
Smallest
{ private int index; private int
smallest
; public
Smallest
(){ index = 0;
smallest
= 0; } public
Smallest
(int i, int s){ index…
Re: Finding the Smallest and Second Smallest Number
Programming
Software Development
12 Years Ago
by NickPatton
…; [/CODE] then you need to set the second
smallest
then the first like this: [CODE] cin >…Second_Smallest_Value =Integers[i]; } } } cout << "The
Smallest
Integer Entered is: " << Smallest_Value << "…however, I get garbage for both the
smallest
and second
smallest
numbers. Any ideas? I'll keep …
i get the right large number but not smallest
Programming
Software Development
12 Years Ago
by clickspiker23
…;> input; // if (input == -99) // { // input = 0; // } if (input <
smallest
) {
smallest
= input; } if (input > largest ) { largest = input; } } while (input != -99…
Re: Fining smallest values in Array
Programming
Software Development
11 Years Ago
by crazymidget01
…as the
smallest
. Still no luck. public static
Smallest
indexOfSmallest(int[] a, boolean[] b){
Smallest
x = new
Smallest
(); for(…j: " + j + " b[j] is false.
Smallest
: " + x.getSmallest()); break; } } for(int i =…
Find Smallest Number In Array Of Random Numbers
Programming
Software Development
9 Years Ago
by Glaven
…;iostream> using namespace std; int main() { int total,average,
smallest
; int row=0; int col=0; int ArrayGrid [10][8…) cout << "
Smallest
Number Is: "<<
smallest
<<endl<<endl; } { if (
smallest
>= 1) cout <…
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
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
© 2024 DaniWeb® LLC