Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <conio.h>
- using namespace System;
- using namespace std;
- int n;
- void main()
- {
- char opciones[2] = { 's','n' };
- do
- {
- cout << "Ignrese n: ";
- cin >> n;
- } while (n>30&&n<1);
- int *enc1 = new int[n];
- int *enc2 = new int[n];
- int *enc3 = new int[n];
- Random x1;
- Random x2;
- Random x3;
- for (int i = 0; i < n; i++)
- {
- cout << "Encuestado " << i + 1 << "Marque <s> o <n> " << endl;
- enc1[i] = char(opciones[x1.Next(2)]);
- cout << "Consume enc1: " << char(enc1[i]) << endl;
- enc2[i] = opciones[x1.Next(2)];
- cout << "Consume enc2: " << enc2[i] << endl;
- enc3[i] = opciones[x1.Next(2)];
- cout << "Consume enc3: " << enc3[i] << endl;
- }
- _getch();
- }
Add Comment
Please, Sign In to add comment