Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C++ by Program ( 15 years ago )
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int a,n,c,suma,srednia,licznik;
    suma=0;
    licznik=0;
    c=0;
    cin >> n;
    for(;licznik<n;)
    {
                    cin >> a;
                    if(a%5==0)
                    {
                              c=c+1;
                              }
                    suma=suma+a;
                    licznik=licznik+1;
                    srednia=suma/n;
                    }
                    cout <<suma<< endl;
                    cout <<srednia<< endl;
                    cout <<c<< endl;
    
    system&#40;"PAUSE"&#41;;
    return EXIT_SUCCESS;
}

 

Revise this Paste

Your Name: Code Language: