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...