@Александр "КАС"
1 / 1 / 0
Регистрация: 19.01.2011
Сообщений: 134
|
|
|
26.05.2011, 20:19. Просмотров 357. Ответов 3
C++ | 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
| #include "stdafx.h"
#include <stdio.h>
#include <conio.h>
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int i,a[100],n,max,t;
cout<<"vvedite chislo elementov=";
cin>>n;
if (n!=0)
{
for (i=1;i<=n;i++)
{
cout<<"a"<<i<<"="; cin>>a[i];
};
max=a[1];
for (i=1;i<=n;i++){ if(a[i]>=max) {max=a[i];};
cout<<max; t=0;
for (i=1;i<=n;i++){if (a[i]=max) {t++;};
cout<<"vstrechaetsa="<<t;
}
_getch();
} |
|
в чем ощибка
0
|