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.

subroutine interfiere con el codigo principal de una carpeta

+5 votes
asked Jan 15, 2025 by Davor Zaro (200 points)
Quiero saber si uno puede utlizar en fortran manejo el f90, subroutinas en el codigo, ya que no me deja, solo un codigo y los demas ficheros, se puede hacer algo, o alguna recomendación.

1 Answer

0 votes
answered Jan 29, 2025 by Islam Aouci (170 points)
#include <iostream>
using namespace std;

int main()
{
    int primo, secondo, posizione, risultato, contatore;
    primo=1;
    secondo=1;
    risultato=2;
    contatore=0;
    cout << "Questo programma restiturà il numero della sequenza di Fibonaccci nella posizione inserita"<< endl;
    cout << "Inserisci la posizione"<< endl;
    cin >> posizione;
    while (contatore<posizione)
    {risultato=primo+secondo;
    cout<<"" <<risultato << endl;
    contatore=contatore+1;
    primo=secondo;
    secondo=risultato;
    }
    cout<<"il numero corrispondente è:"<<risultato<<endl;

    return 0;
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...