Manyaya
?>

Среди чисел a, b, c определить количество отрицательных.

Информатика

Ответы

Мария-Кострыгина175
Program one; var  a, b, c: real;   count : byte; begin  readln (a, b, c);   count : = 0;   if a < 0 then  inc  (count);   if b < 0 then inc (count);   if c < 0 then inc (count);   wrireln (count); end.надеюсь на лучший ответ: )
zhannasokortova
Const n=10; var a:   array [1..n] of integer;   - массив чисел var i,j,s: integer; begin   j: =0;   s: =0;     for i: =1 to n do a[i]: =random(100);   for i: = 1 to n do       begin           if ((a[i] mod 5 = 0) or (a[i] mod 10 = 0)) then         begin             s: =s+a[i]; j: =j+1;         end;     end;   writeln('число чисел, кратных 5 и 10   =   ',  j);   writeln('сумма чисел = ',s); end.  
kim-1971

#include "stdafx.h"

#include <stdio.h>//i/o

#include <conio.h> //_getch()

#include <ctype.h> //toupper

 

int main()

 

{

   long i,n;

   float cost, p,buf;

   do

   {

       printf("Vvedite pervonachalnuy stoimost : ");scanf_s("%f",&cost);

       printf("Vvedite procent p %  : ");scanf_s("%f",&p);

       printf("Vvedite n chisl Let : ");scanf_s("%u",&n);

       for(i = 0; i < n; i++)

       {

           printf("Let %u\r\n",i + 1);

           buf = cost*p/100;

           printf("Stoimost za zimmu + : %f\r\n",(cost += buf));

           buf = cost*p/100;

           printf("Stoimost za zimmu -: %f\r\n",(cost -= buf));

       }

       printf("Stoimost %u Let %f\r\n",i,cost);

       printf("Najmite Y - new input\r\n");

   }

   while(toupper(_getch()) == 'Y');

   return 0;

}

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Среди чисел a, b, c определить количество отрицательных.
Ваше имя (никнейм)*
Email*
Комментарий*