
1, 2:
#include <stdio.h>
#define ROWS 3
#define COLS 3
int main(void)
{
float arr[][COLS] =
{
{ 1.01, 7.4, 12.3 },
{ -4.2, 8.44, 0.0 },
{ 7.1, -6.0, 4.21 }
};
float sum = 0.0f;
unsigned count = 0u;
for (register unsigned i = 0u; i < ROWS; i++)
{
for (register unsigned j = 0u; j < COLS; j++)
{
if (arr[i][j] < 2.5f)
sum += arr[i][j];
if(arr[i][j] < 0.0f)
count++;
}
}
printf("sum = %.2f, count of elements less than zero = %u\n", sum, count);
return 0;
}
ответ: писал на С++
1)
#include<iostream>
using namespace std;
int main()
{
int x,y;
cin>>x>>y;
if(x>y) cout<<"x";
else cout<<"y";
return 0;
}
2)
#include<iostream>
using namespace std;
int main()
{
int x,y;
cin>>x>>y;
if(x>y) x*=x;
else y*=y;
cout<<"x="<<x<<" y="<<y;
return 0;
}
3)
#include<iostream>
using namespace std;
int main()
{
int x,y,z;
cin>>x>>y>>z;
if(x>y && y>z) cout<<"Yes";
else cout<<"No";
return 0;
}