Temperature aula
Anonymous
plain_text
08/25/2022 2:03 PM
1.1 KB
13
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...