Search
 
SCRIPT & CODE EXAMPLE
 

CPP

Corong_ExerciseNo3

write a program that will input five (5) numbers display the highest number
Comment

Corong_ExerciseNo3

#include<stdio.h>

int main()
{
  int A,B,C,D,E;
  
  printf("ENTER THE FIVE NUMBERS");
  scanf("%d %d %d %d %d",&A,&B,&C,&D,&E);
  
  if(A>B && A>C && A>D && A>E)
    printf("%d is largets",A);
  
  else
    if(B>A && B>C && B>D && B>E)
      printf("%d is largest",B);
  
  else
    if(C>A && C>B && C>D && C>E)
      printf("%d is largest",C);
  
  else
    if(D>A && D>B && D>C && D>E)
      printf("%d is largest",D);
  
  else
    if(E>A && E>B && E>C && E>D)
      printf("%d is largest",E)"
      
      return 0;
}
Comment

Corong_ExerciseNo3(1)

Write a program that will input a number and will print "Divisible" if the number is divided by 5, otherwise print "Not Visible"
Comment

Corong_ExerciseNo3(2)

Write a program that will input a number and will print "Divisible" if the number is divided 5, otherwise print "Not Visible"
Comment

Corong_ExerciseNo3(2)

#include<stdio.h>

int main()
{
  int number;
  
  printf("
 Please enter any number to check weather it is divisible by 5:");
  scanf("%d",&number);
  |
    if(number % 5 == 0)
    printf("
 %d is divisible",number)
    
    else
      printf("
 %d is Not Divisible",number)
      return 0;
}
Comment

Corong_ExerciseNo3(2)

#include<stdio.h>

int main()
{
  int number;
  
  printf("
 Please enter any number to check weather it is divisible by 5:");
  scanf("%d",&number);
  |
    if(number % 5 == 0)
    printf("
 %d is divisible",number);
    
    else
      printf("
 %d is Not Divisible",number);
      return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ write number to registry 
Cpp :: c++ fstream read line write ,creat file program 
Cpp :: C++ Relational Operators 
Cpp :: what is c++ 
Cpp :: How to remove the % in zsh that show after running c++ file 
Cpp :: glUniform bool 
Cpp :: identity 
Cpp :: can i delete a null pointer in c++ 
Cpp :: find min and max in array c++ 
Cpp :: c to c++ code converter 
Cpp :: 10^18 data type in c++ 
Cpp :: properties of loop in c++ and how it works 
Cpp :: sideways triangle c++ xy plane 
Cpp :: remove digit from number c++ 
Cpp :: Create an algorithm to identify what is the next largest element on a stack (using stack/queue operations only) INPUT: [ 10, 3, 1, 14, 15, 5 ] OUTPUT: 10 - 14 3 - 14 1 - 14 14 - 15 15 - -1 5 - -1 
Cpp :: Qt asynchronous HTTP request 
Cpp :: CPP Find options passed from command line 
Cpp :: Catcoder mars rover solution in c++ 
Cpp :: Use of Scope Resolution operator for namespace 
Cpp :: time function in c++ 
Cpp :: c++ watch a variable 
Cpp :: sfml get position 
Cpp :: armstrong number 
Cpp :: inside information subtask 2 
Cpp :: program in c++ for simple interest rate 
Cpp :: 3 conditions for a while loop c++ 
Cpp :: read large files part by part in C++ 
Cpp :: 16630147 
Cpp :: constructor init list 
Cpp :: 1281. Subtract the Product and Sum of Digits of an Integer leetcode solution in c++ 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =