SHARE
TWEET

Untitled

a guest Jan 20th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream.h>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. int main(){
  7.   int znamka, vaha, soucetznamek, soucetvah = 0;
  8.   cout << "Zadejte znamku a vahu v teto posloupnosti, oddelene mezerou a potvrdte enterem.\nZadavani ukoncite zadanim hodnot 0 0.\nznamka vaha\n";
  9.   while(znamka != 0){
  10.     cin >> znamka;
  11.     cin >> vaha;
  12.     soucetznamek += (znamka * vaha);
  13.     soucetvah += vaha;
  14.   }
  15.   cout << soucetznamek << " " << soucetvah << " Vas prumer je -> " << (double)soucetznamek/(double)soucetvah) << "\n";
  16.  
  17. //system("pause > nul");
  18.   return 0;
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top