Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<conio.h>
- using namespace std;
- using namespace System;
- void multiplicacionE(int id) {
- int arr[12];
- for (int c = 0; c < 12; c++)
- {
- arr[c] = c*id;;
- }
- for (int c = 0; c < 12; c++)
- {
- cout << arr[c] << endl;
- }
- }
- void multiplicacionD(int id,int n) {
- int *arr = new int[n];
- for (int c = 0; c <n; c++)
- {
- arr[c]= c*id;;
- }
- for (int c = 0; c <n; c++)
- {
- cout << arr[c]<<endl;
- }
- }
- void pares(int id, int n) {
- int *arr = new int[n];
- for (int c = 0; c <n; c++)
- {
- arr[c] = (c+1)*id;;
- }
- for (int c = 0; c <n; c++)
- {
- cout << arr[c] << endl;
- }
- }
- void primos(int n) {
- int c = 1;
- for (int cd = 0; cd <n;cd++)
- {
- }
- }
- int main() {
- ////declaracion de un arreglo estatico
- //int a[4];//arreglo de 4 espacios y empieza desde 0
- //cout << a[0]<<endl;
- //cout << a[1] << endl;
- //cout << a[2] << endl;
- //cout << a[3] << endl;
- //int a1[4] = { 0,1,2,3 };//arreglo de 4 espacios y empieza desde 0
- // //das valor a los espacios
- //cout << a1[0] << endl;
- //cout << a1[1] << endl;
- //cout << a1[2] << endl;
- //cout << a1[3] << endl;
- //int a2[] = { 3,2,1,0 };//arreglo de x espacios y empieza desde 0
- // //das los valores que quieras cuando no hay un numero
- // //depende de los valores que les des y define el arreglo
- //cout << a2[0] << endl;
- //cout << a2[1] << endl;
- //cout << a2[2] << endl;
- //cout << a2[3] << endl;
- ////declarando arreglo dinamico we :v
- //int *arrD = new int(10);//creo un solo valor
- //int *arrD1 = new int[10];//creacion de 10 espacios dinamicos
- //multiplicacionD(3,10);
- //multiplicacionE(3);
- //pares(2,100);
- primos(50);
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement