
Voimap
6 год назад
Написать программу которая выводит пример на умножение однозначных чисел ( рандомно)с помощью ветвления помогите!!!!!!плииииз!!!
ОТВЕТЫ

Аверьян
Jul 9, 2019
// ConsoleApplication60.cpp: определяет точку входа для консольного приложения.//
#include "stdafx.h"#includelt;conio.hgt;#include"iostream"#include "stdio.h"#include "time.h"
using namespace std;
int main(){ int x, y,c; setlocale(LC_ALL, "RUS"); srand((unsigned)time(NULL)); x = rand() 8 + 2; y = rand() 8 + 2; cout lt;lt; "Сколько будет " lt;lt; x lt;lt; "*" lt;lt; y lt;lt; "" lt;lt; "\n"; cout lt;lt; "Введите ответ и нажмите Enter "; cin gt;gt; c; if (x*y == c) { cout lt;lt; "Правильно\n"; } else { cout lt;lt; "Вы ошиблись " lt;lt; x lt;lt; "*" lt;lt; y lt;lt; "=" lt;lt; c; }return 0;}
#include "stdafx.h"#includelt;conio.hgt;#include"iostream"#include "stdio.h"#include "time.h"
using namespace std;
int main(){ int x, y,c; setlocale(LC_ALL, "RUS"); srand((unsigned)time(NULL)); x = rand() 8 + 2; y = rand() 8 + 2; cout lt;lt; "Сколько будет " lt;lt; x lt;lt; "*" lt;lt; y lt;lt; "" lt;lt; "\n"; cout lt;lt; "Введите ответ и нажмите Enter "; cin gt;gt; c; if (x*y == c) { cout lt;lt; "Правильно\n"; } else { cout lt;lt; "Вы ошиблись " lt;lt; x lt;lt; "*" lt;lt; y lt;lt; "=" lt;lt; c; }return 0;}
182
Смежные вопросы: