Saturday, June 13, 2020

Highest and Lowest Value Checker Using C Language

Design a program using a one-dimensional array that will ask the user to give a series of numbers and then the program will check and determine which of the given number is the highest and lowest in terms of numerical value and then display the result on the screen using the C programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.My mobile number here in the Philippines is 09173084360. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.comMy programming website is http://www.jakerpomperada.blogspot.comI am also a book author you can purchase my books on computer programming and information technology in the following links below.https://www.unlimitedbooksph.com/

Sample Program Output


Program Listing

/* highest_lowest.c
   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
   Date     : June 13, 2020    6:54 AM  Saturday
   Location : Bacolod City, Negros Occidental
   Tool     : Dev C++ Version 5.11
   Website  : http://www.jakerpomperada.com
   Email    : jakerpomperada@jakerpomperada.com and jakerpomperada@gmail.com
*/
#include <stdio.h>
int main ()
{
    int arr[20], b=0, max=0, min=0;
    printf("\n\n"); 
    printf("\t\tHighest and Lowest Value Checker");
    printf("\n\n");
    printf("\tHow many items to be process? : ");
    scanf("%d",&b);
    printf("\n\n");
    printf("\tEnter items values : ");
    for (int a = 0; a < b; a++){
     scanf("%d",&arr[a]);
      }
        max = arr[0];
    for (int a = 0; a < b; a++)
    {
        if (max < arr[a])
            max = arr[a];
    }
    min = arr[0];
    for (int a = 0; a < b; a++)
    {
        if (min > arr[a])
            min = arr[a];
    }
    printf("\n\n");
    printf("\t===== DISPLAY RESULT =====");
    printf("\n\n");
    printf("\tThe Largest Value is %d.",max);
    printf("\n\n");
    printf("\tThe Smallest Value is %d.",min);
    printf("\n\n");
    printf("\tEnd of Program");
    printf("\n\n");
}



No comments:

Post a Comment