-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path8.63.cpp
More file actions
37 lines (36 loc) · 789 Bytes
/
8.63.cpp
File metadata and controls
37 lines (36 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <stdio.h>
int main()
{
int model,aracsayisi=0,toplam=0;
int enkucuk=2016,enbuyuk=0,ortalama,kirpilmis;
while(1)
{
printf("Model yilini giriniz (Durdurmak icin 0 ): ");
scanf("%d",&model);
if(model==0)
{
printf("-------------------------------------------------------------------------\n");
break;
}
if(model<1000 || model>2016)
{
printf("Hata!!! Lutfen 4 haneli giriniz\n");
}
else
{
toplam += model;
aracsayisi++;
if(model>enbuyuk){
enbuyuk=model;
}
if(model<enkucuk){
enkucuk=model;
}
}
}
ortalama=toplam/aracsayisi;
kirpilmis=(toplam-(enbuyuk+enkucuk))/(aracsayisi-2);
printf("Toplam %d adet arac giris yapti\n",aracsayisi);
printf(" Ortalama = %d, Kirpilmis ortalama = %d",ortalama,kirpilmis);
getchar();
}