GreenApelsin
11.05.2020 11:01

Int main()
{
setlocale(lc_all, "russian");
const int n = 5; //определяем константу
float c = 1, f = 0;
int p[n];
cout < < "введи любые пять цифр через пробел: ", '\n';
for (int a = 0; a < = n - 1; a++)
{
cin > > p[a];
}
for (int a = 0; a < = n - 1; a++)
{
if ((p[a] == 0) & (p[a + 1] ! = 0))
{
do
{
a = a + 1;
c = p[a] * c;
} while (p[a + 1] ! = 0);
break;
}
}
cout < < "произведение: " < < endl;
cout < < c < < endl;
}

сделайте для этого блок схему

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
khezh073
07.05.2023 19:44
1)
#include <iostream>
#include <math.h>

using namespace std;

int main() {
 int a;
 cin >> a;
 int d = a%10;
 string s = "yes";
 while(abs(a) > 0) {
   if(a%10 != d) {
     s = "no";
     break;
   }
   a/=10;
  }
  cout << s << endl;
}
2)
#include <iostream>
#include <math.h>

using namespace std;

int main() {
 int a;
 cin >> a;
 int d = a%10;
 a/=10;
 string s = "no";
 while(abs(a) > 0) {
  if(a%10 == d) {
    s = "yes";
    break;
  }
  d = a%10;
  a/=10;
  }
  cout << s << endl;
}
0,0(0 оценок)
Ответ:
Аленушка54545454
07.05.2023 19:44
1)
#include <iostream>
#include <math.h>

using namespace std;

int main() {
 int a;
 cin >> a;
 int d = a%10;
 string s = "yes";
 while(abs(a) > 0) {
   if(a%10 != d) {
     s = "no";
     break;
   }
   a/=10;
  }
  cout << s << endl;
}
2)
#include <iostream>
#include <math.h>

using namespace std;

int main() {
 int a;
 cin >> a;
 int d = a%10;
 a/=10;
 string s = "no";
 while(abs(a) > 0) {
  if(a%10 == d) {
    s = "yes";
    break;
  }
  d = a%10;
  a/=10;
  }
  cout << s << endl;
}
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота