Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

a program in fortran

–4 votes
asked May 6, 2020 by amir rajabi (120 points)
how can I  write a program that give ten numbers and give 5 biggest number

2 Answers

–1 vote
answered May 2 by Han-ma-bookie (310 points)
creating the conditions, use if and else if functions for it:

for example:

#include <iostream>

using namespace std;

int main () {

float a, b;

cout << "insert 1st: ";

cin >> a;

cout << "insert 2nd: ";

cin >> b;

if (a > b)

cout << "1 > 2" << endl;

else if (a < b)

cout << "1 < 2" << endl;

else

{

cout << "1 = 2" << endl;

}

  return 0;

}
commented May 3 by Peter Minarik (25,430 points)
This is not Fortran.
commented May 4 by Han-ma-bookie (310 points)
it's c++
my bad
0 votes
answered May 3 by Peter Minarik (25,430 points)
Please, check out your favourite Fortran tutorials to learn the language.

I'll give you one if you don't know any: https://www.tutorialspoint.com/fortran/index.htm

Give it your best shot, then come back to us if you have a code and it still doesn't do what you want it to do.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...