Var
i,a:integer;
b,c:real;
Begin
read(a);
for i:=1 to a do begin
read(c);
b:=b+c;
end;
writeln(c/a);
end.
using System;
using System.Linq;
namespace Prog
{
public class Program
{
public static void Main(string[] args)
{
String str = "15 0 87 2 34";
String[] nums = str.Split(' ');
var evenNumbers = nums.Where(i => Convert.ToInt32(i) % 2 == 0);
foreach (String i in evenNumbers)
Console.WriteLine(i);
}
}
}
Подробнее - на Znanija.com - znanija.com/task/30617450#readmore
#include<iostream>#include<conio.h>using namespace std;
int main(){float milkPrice,bredPrice,procent; cout<<"moloko = "; cin>>milkPrice; cout<<"\nxleb = "; cin>>bredPrice; cout<<"**********************************"<<endl; cout<<"podnyat ceny na "; cin>>procent; if (procent <= 0) { cout<<"plohoy procent"; _getch(); return 0; }else{ cout<<"stariye ceni:\nXLEb: "<<bredPrice<<" \nMoloco: "<<milkPrice<<endl; cout<<"**********************************"<<endl; cout<<"new ceni:\nXLEb: "<<(bredPrice*procent/100)+bredPrice<<" \nMoloco: "<<(milkPrice*procent/100)+milkPrice; } _getch();return 0;}
Как-то так. надеюсь подойдет...