Search
 
SCRIPT & CODE EXAMPLE
 

C

This C Program is used to find the greatest among ten numbers.

#include <stdio.h>
  int main() {
    int a[10];
    int i;
    int greatest;
    printf("Enter ten values:");
    //Store 10 numbers in an array
    for (i = 0; i < 10; i++) {
        scanf("%d", &a[i]);
    }
    //Assume that a[0] is greatest
    greatest = a[0];
    for (i = 0; i < 10; i++) {
        if (a[i] > greatest) {
        greatest = a[i];
    }
    }
    printf("
    Greatest of ten numbers is %d", greatest);
    return 0;
  }
Comment

PREVIOUS NEXT
Code Example
C :: c language dictionary implemet 
C :: allocate a array on strings in c 
C :: how to know a type of a numbe in c 
C :: manasa loves maths solution IN C 
C :: %d and %i 
C :: how to add a number before every line in c language 
C :: yt-project annotate_scale 
C :: print hello world c 
C :: unconstrained box flutter 
C :: print octal in c 
C :: + ********************* 
C :: qgraphicsscene save all items to file 
C :: countoddevenDifference 
C :: write to file in c programming 
C :: aws solution architect vs developer associate 
C :: how to find the elements in array c coding 
C :: arduino analogwrite 
Dart :: flutter textformfield hide underline 
Dart :: java utils wait for seconds 
Dart :: rounded borders for container in flutte 
Dart :: how to find the type of object in dart 
Dart :: options != null "FirebaseOptions cannot be null when creating the default app." 
Dart :: hide debug flag flutter 
Dart :: hive regiter adapter enum 
Dart :: format currency flutter 
Dart :: flutter text button 
Dart :: DartPad requires localStorage to be enabled 
Dart :: inkwell in image flutter not working 
Dart :: dart replase 
Dart :: Send Form Data in HTTP POST request in Flutter 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =