Temperature aula

 avatar
unknown
plain_text
3 years ago
831 B
2
Indexable
/******************************************************************************

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, 
C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS
Code, Compile, Run and Debug online from anywhere in world.

*******************************************************************************/
#include <iostream>
using namespace std;

int main(){
    float tempmed;
    float vett[5];
    
    cout<<"inserisci le temperature di ogni aula:"<<endl;
    
    for(int i=0;i<5;i++){
        cin>>vett[i];
    }
    
    for(int i=0;i<5;i++){
       tempmed+=vett[i];
    }
    
    tempmed=tempmed/5;
    cout<<"la temperatura e'"<<tempmed<<endl;
    
    return 0;

    
}

    
    
    
    
    
    
    
    
    
    
    
Editor is loading...