Thread: smallest number in given sequence

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2021
    Posts
    66
    Thanks to all for showing different approach

    Quote Originally Posted by rstanley View Post
    john.c:

    Except that your minimal correction still skips the first element of the array:
    Code:
    for (int i = 0; i < 9; i++)
    
    NOT
    
    for (int i = 1; i < 9; i++)
    we assume that first number in the array is smallest number. That's why we are not comparing. It's not good idea to compare same number in twice

    @john thanks for correction
    Last edited by Rahul11; 12-11-2021 at 11:58 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I want to plus largest number and smallest number
    By Doffer in forum C Programming
    Replies: 4
    Last Post: 10-28-2019, 03:05 PM
  2. find the smallest number:
    By jocdrew21 in forum C++ Programming
    Replies: 3
    Last Post: 10-03-2013, 01:56 PM
  3. smallest largest number
    By manzoor in forum C++ Programming
    Replies: 10
    Last Post: 05-12-2008, 07:56 AM
  4. smallest digit of a number
    By lakestar in forum C Programming
    Replies: 1
    Last Post: 11-11-2007, 08:57 PM
  5. largest and smallest number
    By wise_ron in forum C Programming
    Replies: 11
    Last Post: 10-05-2006, 03:25 PM

Tags for this Thread