Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
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
Please
log in
to post a comment.
shifting
CPP - Ex 5
c++_array_size
random lotto number game
project
Continuous Sub Set with given sum
Longest Palindrom in String
Print reverese string non repeated chars
EN WU WU
PyramidTransitionMatrix_recursive
Please log in to post a comment.