Jump to content

Recommended Posts

Posted

#include <iostream>
#include <stdio.h>

using namespace std;

int main()
{
    int number;
    int total = 0;
    int counter = 1;
    int average;

    while(counter<= 10)
    {
        cout<<"Dose arithmous\n";
        cin>>number;
        total = total + number;
        counter++;
    }
    average = total/10;
    cout<<"mesos oros ine "<<average;

    getchar();
}

An to aniksw apo to: build and run..ine ola ok. omos an paw sto debug fakelo kai trexo to exe to getchar() dn litourgei kai dn prolavenw na dw to meso oro.

Dokimasa kai to return 0 ; ala tpt pali ta idia...apo to build and run trexei kanonika, ala pos gia paradigma tha to stilo se alon? ti na prostheso?....plz gyes apantiste

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..