Docsity

Programacion C++ booleana, Ejercicios de Programación C

Toggle sidebar
bg1
Código c++
#include <iostream>
using namespace std;
int main()
{
bool A, B, C;
bool S;
std::cout<<"A B C = S"<< endl;
A=0;
B=0;
C=0;
S=(!C && (!A && !B || !A && B)) || (A && (B ^ C));
cout << " "<<A<<" " <<B<<" "<<C<<" " <<S<< endl;
return 0;
}
pf3
pf4

Vista previa parcial del texto

¡Descarga Programacion C++ booleana y más Ejercicios en PDF de Programación C solo en Docsity!

Código c++ #include using namespace std; int main() { bool A, B, C; bool S; std::cout<<"A B C = S"<< endl; A=0; B=0; C=0; S=(!C && (!A && !B || !A && B)) || (A && (B ^ C)); cout << " "<<A<<" " <<B<<" "<<C<<" " <<S<< endl; return 0; }

CODIGO STM

int main(void) { /* USER CODE BEGIN 1 / / USER CODE END 1 / / MCU Configuration--------------------------------------------------------/ / Reset of all peripherals, Initializes the Flash interface and the Systick. / HAL_Init(); / USER CODE BEGIN Init / / USER CODE END Init / / Configure the system clock / SystemClock_Config(); / USER CODE BEGIN SysInit / / USER CODE END SysInit / / Initialize all configured peripherals / MX_GPIO_Init(); / USER CODE BEGIN 2 / / USER CODE END 2 */

/* USER CODE END WHILE */

/* USER CODE BEGIN 3 */

/* USER CODE END 3 */

bool Ecuacion(bool A, bool B, bool C){ return (!C && (!A & !B || !A & B)) || (A && (B^C)); } void ERROR_Handler(void){ while (1){ } }