Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip>
- #include<locale>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL,"Lithuanian");
- int n;
- double pvid,pviso;
- cin>>n;
- for(int i=0;i!=n;i++)
- {
- int p;
- cin>>p;
- pviso=pviso+p;
- };
- cout<<"Iðviso pamokø: "<<pviso<<endl;
- pvid=pviso/n;
- cout<<"Vidutiniðkai per dienà: "<<fixed<<setprecision(1)<<pvid;
- system("pause");
- return 0;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement