Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
srednie
#include <iostream> using namespace std; int tab[1111]; int x,i,t; float s,y; int main() { while(x!=-1) { cin>>x; if(x!=0 && x!=1 && x!=-1) { i++; s=s+x; tab[i]=x; } if(x==1) { y=s/i; printf("%0.2f\n", y); } else if(x==0) { for(t=1;t<=i;t++) { cout<<tab[t]<<" "; } cout<<endl; } } }
run
|
edit
|
history
|
help
0
<string> Indirect include of <errno.h> with gcc
TupleTel
Connected components in complement graph
Dar
inorder traversal
sejmie
Age
read_write_lock_acc
Exempel 1
12