Script sin verificación de credenciales

------------------------------
Send-MailMessage -From "Jason Igneel <jasonigneel@ejemplo.com>" -To "user@ejemplo.com.ec" -Subject "Sending the Attachment" -Body "Forgot to send the attachment. Sending now." -dno onSuccess, onFailure -SmtpServer "11.110.190.78" -Port "587"
------------------------------

Podemos guiarnos como referencia al primer script  Aqui.



Script send messages Anonimus

Posted by : Jason
lunes, 13 de noviembre de 2017
0 Comments
Script con validación de credenciales

creamos un block de notas con estos parámetros
-----------------------------
Nombre, Email, Mensaje
Jason Igneel, jasonpruba@ejemplo.com.ec, Hello everyone
----------------------------
guardamos el archivo de bloc de notas con la extensión .cvs  

en el siguiente archivo creamos un bloc de notas nuevo y copiamos el código de abajo y guardamos con la extensión .ps1 

Código:
------------------------------
$Listado = Import-Csv C:\Users\desktop\Listado.csv

$SMTPServer = "smtp.gmail.com"
$SMTPPort = "587"

$Username = "email@gmail.com"
$Password = "password email"

foreach ( $persona  in  $Listado)
{
    $iName =$persona.Nombre
    $iEmail =$persona.Email
    $iMensaje =$persona.Mensaje
     
    $to = $persona.Email
    $subject ="email@gmail.com"
    $body = @"
    Hola $iName,
     $iMensaje
"@                       

    $mensaje = New-Object System.Net.Mail.MailMessage
    $mensaje.subject = $subject
    $mensaje.body = $body
    $mensaje.to.add($to)
    $mensaje.From = $Username

    $smtp = New-Object System.Net.Mail.SmtpClient ( $SMTPServer , $SMTPPort ) ;
    $smtp.EnableSSL = $true
    $smtp.Credentials = New-Object System.Net.NetworkCredential ( $Username , $Password ) ;
    $smtp.send($mensaje)
    Write-Host  de escritura de correo enviado a $iName
}

Script con credenciales (bulk send messages)

Posted by : Jason 0 Comments


Click to here imagen for download
 Download PS CS6

Photoshop cs6 free

Posted by : Jason
jueves, 24 de agosto de 2017
0 Comments

MODULO DE FACTURACIÓN

En esta factura realizaremos un descuento de 5 productos ya existentes por código y solo la cantidad sera ingresada y al ir al botón calcular nos saldrá 
1.-) El valor total a pagar 
2.-) El descuento de cuanto es 
3.-) El Subtotal.



Código:
Dim DES, ST As Integer
Dim T As Double
Dim COD1, COD2, COD3, COD4, COD5 As Integer
Dim D1, D2, D3, D4, D5 As String
Dim VU1, VU2, VU3, VU4, VU5 As Integer
Dim VT1, VT2, VT3, VT4, VT5 As Integer


Private Sub Command1_Click()
'--------------
'PRIMER CODIGO DE INGRESO
    Label10 = InputBox(" INGRESE EL CODIGO: ", Label12)
    Label10.Visible = Not Label10.Visible
    Label33.Visible = Not Label33.Visible
    Label11.Visible = Not Label11.Visible
    Label11 = 20
    Text1.Visible = Not Text1.Visible
    Label13.Visible = Not Label13.Visible

'SEGUNDO CODIGO DE INGRESO
    Label14 = InputBox(" INGRESE EL CODIGO: ", Label16)
    Label14.Visible = Not Label14.Visible
    Label15.Visible = Not Label15.Visible
    Label16.Visible = Not Label16.Visible
    Label16 = 70
    Text2.Visible = Not Text2.Visible
    Label17.Visible = Not Label17.Visible

'TERCER CODIGO DE INGRESO
    Label18 = InputBox(" INGRESE EL CODIGO: ", Label20)
    Label18.Visible = Not Label18.Visible
    Label19.Visible = Not Label19.Visible
    Label20.Visible = Not Label20.Visible
    Label20 = 15
    Text3.Visible = Not Text3.Visible
    Label21.Visible = Not Label21.Visible
    
'CUARTO CODIGO DE INGRESO
    Label22 = InputBox(" INGRESE EL CODIGO: ", Label24)
    Label22.Visible = Not Label22.Visible
    Label23.Visible = Not Label23.Visible
    Label24.Visible = Not Label24.Visible
    Label24 = 8
    Text4.Visible = Not Text4.Visible
    Label25.Visible = Not Label25.Visible
    
'QUINTO CODIGO DE INGRESO
    Label26 = InputBox(" INGRESE EL CODIGO: ", Label28)
    Label26.Visible = Not Label26.Visible
    Label27.Visible = Not Label27.Visible
    Label28.Visible = Not Label28.Visible
    Label28 = 12
    Text5.Visible = Not Text5.Visible
    Label29.Visible = Not Label29.Visible


End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""

Label10 = ""
Label11 = ""
Label12 = ""
Label13 = ""
Label14 = ""
Label15 = ""
Label16 = ""
Label17 = ""
Label18 = ""
Label19 = ""
Label20 = ""
Label21 = ""
Label22 = ""
Label23 = ""
Label24 = ""
Label25 = ""
Label26 = ""
Label27 = ""
Label28 = ""
Label29 = ""
Label30 = ""
Label31 = ""
Label32 = ""
Label33 = ""



End Sub

' OPERCACIONES DEL BOTON CALCULAR
Private Sub Command3_Click()

VT1 = (Text1.Text * Label11)
Label13 = VT1

VT2 = (Text2.Text * Label16)
Label17 = VT2

VT3 = (Text3.Text * Label20)
Label21 = VT3

VT4 = (Text4.Text * Label24)
Label25 = VT4

VT5 = (Text5.Text * Label28)
Label29 = VT5

ST = VT1 + VT2 + VT3 + VT4 + VT5

If ST < 100 Then
Label12 = "% 5"
DES = (ST * 5) / 100
Else
        If ST >= 100 And ST <= 200 Then
        Label12 = "% 10"
        DES = (ST * 10) / 100
        Else
                If ST > 200 Then
                Label12 = " %15"
                DES = (ST * 15) / 100
                End If
       End If
       
 End If
 T = (ST - DES)

 Label32 = T
 Label30 = ST
 Label31 = DES

MSBOX = ("SU TOTAL A PAGAR ES DE : " & T)
End Sub

' SALTOS DE LINEAS PRECIONANDO LA TECLA ENTER
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
End If
End Sub
Private Sub Command4_Click()
End
End Sub



FACTURACION EN VISUAL BASIC

Posted by : Jason
lunes, 31 de julio de 2017
1 Comment

MegaDownloader v1.7 Multilenguaje


Descripción

     MegaDownloader, es un Gestor/Acelerador de descargas desde el Servidor MEGA (mega.co.nz); que nos permite descargar a máxima velocidad, gestionar nuestros archivos de forma facil y rápida ademas que es totalmente seguro y sin limites, este programa esta disponible para Descargar en versión instalable como en Portable.

Datos técnicos

     Nombre: Megadownloader 1.7
     Idioma: Español, Multilenguaje
     Arquitectura: 32-bit & 64-bit
     Tamaño: 2.0 MB
     Tipo de Archivo: RAR


REQUERIMIENTOS DEL SISTEMA

     Debes usar Windows XP SP3 o superior (Vista, Windows 7, Windows 8, etc) y tener instalado .NET 3.5 o superior.
También funciona en MAC con Parallels, teniendo en cuenta que debes instalar .NET 3.5 o superior.


Link de Descarga:

     Descargar Megadownloader 1.7 Portable (Click HERE)

MegaDownloader v1.7

Posted by : Jason
sábado, 24 de junio de 2017
0 Comments
Metodo SHAKER o Sacudida

codigo:

#include<iostream>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
//****************************** INSERTAR ************************************//

int *Insertar(int *A ,int N)
{
 for( int i = 0 ; i < N ; i++ )
    {
        cout<<endl<<"    - Ingrese el valor ["<<i + 1<<"] = ";
        cin>>A[i];
   
    }
 return A;  
}
//******************************* MOSTRAR ************************************//
void Mostrar(int *A ,int N)
{

 for( int i = 0 ; i < N ; i++ )
    {
   
    cout<<endl<<"      - Valor ["<<i + 1<<"] = "<<A[i]<<endl;
   
    }    
}

/****************************************************************************
el método de la sacudida (shaker sort).
Es la operación de arreglar los registros de una tabla en algún orden secuencial de acuerdo a cierto criterio de orden,
con el propósito principal de facilitar las búsqueda de los miembros del conjunto ordenado.
//****************************** SHAKER o sacudida**************************************/

int *Shaker(int *A, int N)
{
 int i = 0 , izq = 1 , der = N-1 , k = N-1 , aux = 0;
 while( der >= izq )
      {
      for( i = der ; i>= izq ; i-- )  
            if( A[i-1] > A[i])
              {
                aux = A[i-1];
                       
                A[i-1]=A[i];
                       
                A[i]=aux;
                       
                k=i;                    
              }            
      izq = k + 1;    
      for( i = izq ; i <= der ; i++)
             
            if( A[i-1] > A[i] )
                 
              {
                   
                aux = A[i-1];
                       
                A[i-1]=A[i];
                       
                A[i]=aux;
                       
                k=i;
              }
     
      der = k-1;

    }
 return A;
}

int main()
{
  system("COLOR F3");
   
  int *A = NULL;

  A = (int*)malloc(sizeof(int));

  int N;

  int opcion;
     
  cout<<endl<<"  >> INGRESE LOS VALORES :  ";
  cout<<endl<<"      --------------------------------> ";
  cin>>N;
 
  A = Insertar( A , N );
  A = Shaker( A , N );
               
                cout<<endl<<"  - [ METODO MEDIANTE SHAKER (SACUDIDA) ] - "<<endl;
               
                Mostrar(A , N);
    cout<<endl<<endl;
 system("pause");

}

---------------------------------------------------------------------------------------------------------------------

Metodo Shell


codigo:

//metodo de Shell
#include<iostream>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
//****************************** INSERTAR ************************************//

int *Insertar(int *A ,int N)
{
 for( int i = 0 ; i < N ; i++ )
    {
        cout<<endl<<"    - Ingrese el valor ["<<i + 1<<"] = ";
        cin>>A[i];
   
    }
 return A;  
}
//******************************* MOSTRAR ************************************//
void Mostrar(int *A ,int N)
{

 for( int i = 0 ; i < N ; i++ )
    {
   
    cout<<endl<<"      - Valor ["<<i + 1<<"] = "<<A[i]<<endl;
   
    }    
}

/****************************************************************************
El ordenamiento Shell (Shell sort en inglés) es un algoritmo de ordenamiento. El método se denomina Shell en honor de su inventor Donald Shell.
Su implementación original, requiere O(n2) comparaciones e intercambios en el peor caso. Un cambio menor presentado en el libro de V.
Pratt produce una implementación con un rendimiento de O(n log2 n) en el peor caso.
Esto es mejor que las O(n2) comparaciones requeridas por algoritmos simples pero peor que el óptimo O(n log n).
Aunque es fácil desarrollar un sentido intuitivo de cómo funciona este algoritmo, es muy difícil analizar su tiempo de ejecución.
//****************************** SHELL ***************************************/
int *Shell(int *A , int N)
{

 int i,j,bandera,aux;


 for( j = N/2 ; j > 0 ; j = j/2)
   
    {

    do
     {
   
        bandera=0;

       for( i = 0 ; i < N - j ; i++)
            {
           
          if( A[i] > A[i+j] )
            {
           
                aux = A[i];
             
                A[i] = A[i+j];
             
                A[i+j] = aux;
             
                bandera=1;
               
            }
     
            }
        }    
   
    while(bandera);

  }
 
 return A;
     
}

int main()
{
  system("COLOR F9");
   
  int *A = NULL;

  A = (int*)malloc(sizeof(int));

  int N;

  int opcion;
     
  cout<<endl<<"  >> INGRESE LOS VALORES :  ";
  cout<<endl<<"      --------------------------------> ";
  cin>>N;
 
  A = Insertar( A , N );
  A = Shell( A , N );
         cout<<endl<<"  - [ METODO MEDIANTE SHELL ] - "<<endl;
               
                Mostrar(A , N);
    cout<<endl<<endl;
 system("pause");

}

---------------------------------------------------------------------------------------------------------------------

Metodo QuitShort


Codigo:

#include<iostream>
 #include <algorithm> //para la función sort
 #define LIM 50
 using namespace std;
 /****************************************************************************
El ordenamiento rápido (quicksort en inglés) es un algoritmo basado en la técnica de divide y vencerás, que permite, en promedio,
ordenar n elementos en un tiempo proporcional a n log n.
//****************************** Quitshort **************************************/

 void LeerArray(int n,int x[]);
 void MostrarArray(int n,int x[]);

 int main()
 {
  int n;
  int x[LIM];
  cout<<" -> Ingrese el numero de elementos :";cin>>n;
  LeerArray(n,x);
  sort(x,x+n);//sort(array,array+numeroelementos);
  cout<<"\t\t\t *** MEtodo Quic sort *** "<<endl<<endl;
  cout<<"\t";MostrarArray(n,x);
  system("pause>>null");
  return 0;
 }

 void MostrarArray(int n,int x[])
 {
     for(int i=0;i<n;i++)
     {
         cout<<x[i]<<" ";
     }
 }
 void LeerArray(int n,int x[])
 {
     for(int i=0;i<n;i++)
     {
         cout<<" Elemento ["<<i<<"]:";cin>>x[i];
     }
}

Metodos De Quitshort - Shell - Shaker(Sacudida)

Posted by : Jason
miércoles, 1 de marzo de 2017
0 Comments
Activaciones  de Windows y Office  de todas las versiones en uno solo Link. 
subido el  programa por MEGA .

Activación de Windows 7/ 8/ 8.1/ 10
 Activación de Office 2010/2013/2016


Link del Programa: << Download Here >>

Activación de Windows y Office en uno solo Todas las versiones

Posted by : Jason
domingo, 29 de enero de 2017
0 Comments
Expresión In-fija a Posfija en C/C++ explicando paso a paso como se llega a la Posfija y obteniendo el resultado de la función ingresada.
Echo en Dev C++,





Código:

#include <cstdlib>
#include <iostream>
#include <string>
#include <stack>
#include <cmath>

using namespace std;

/* Operadores matematicos */
#define N_operators 6
const string operators[N_operators] = {"+", "-", "*", "/", "%", "^"};
int precedences[N_operators] = {1, 1, 2, 2, 2, 3};

bool is_operator( const string );
int precedence( const string );

int main() {

string infix, postfix, token;
stack <string> standby;
stack <double> result;
size_t i;
char c;
double A, B;

  system("color f9");
/* Cadena de entrada */
cout <<"\n\tGRUPO N 1  \n"<<endl;
    cout <<"\t Programa para ingresar una exprecion Infija a posfija \n y resolver la exprecion Posfija.  "<<endl;
cout << "\nEscriba la expresion infija: ">
getline( cin, infix );
cout << endl;

/*************************************************************
 PRIMERA PARTE: Procesar la cadena infijo, y crear posfijo
*************************************************************/

for ( i = 0; i < infix.size(); i++ ) {
/* esto debe cambiar luego a un token o palabra devuelta por
* el analizador léxico */
c = infix[i];
token.clear();
token += c; /* parece burdo, pero no conozco mejor manera de
* crear un string a partir de un unico caracter */

/* es un espacio: despreciar */
if ( c == ' ' ) continue;

cout << " '" << c << "'" << endl;

/* es un carácter numérico: pasar al posfijo */
if ( c >= '0' && c <= '9' ) {
cout << "\tes numero: pasado a posfijo" << endl << endl;
postfix = postfix + " " + c;
continue;
}

/* si se lee un operador: sacar de la pila y pasar al postfijo
* todos los operadores con una precedencia mayor o igual a la
* suya, y depositar el mismo en la pila */
if ( is_operator( token ) ) {
cout << "\tes operador:" << endl;
while ( !standby.empty() && precedence( standby.top() )
>= precedence( token ) ) {
cout << "\tpasado operador '" + standby.top() +
"' de la pila a posfijo" << endl;
postfix = postfix + " " + standby.top();
standby.pop();
}
standby.push( token );
cout << "\tcolocar '" << token << "' en la pila" << endl << endl;
continue;
}

/* si se lee "(": colocar en la pila */
if ( token == "(" ) {
cout << "pasado a posfijo" << endl << endl;
standby.push( token );
continue;
}

/* si se lee ")": retirar de la pila hasta encontrar '(', y pasar
* los elementos retirados a posfijo, luego descartar el "(" */
if ( token == ")" ) {
while ( !standby.empty() && standby.top() != "(" ) {
cout << "\tpasado operador '" + standby.top() +
"' de la pila a posfijo" << endl << endl;
postfix = postfix + " " + standby.top();
standby.pop();
}
if ( !standby.empty() )
standby.pop(); /* descartar el "(" */
}
}


/* extraer de la pila cualquier operador restante y pasarlo a la cadena posfijo */
while ( !standby.empty() ) {
cout << "Pasado operador '" + standby.top() +
"' de la pila a posfijo" << endl << endl;
postfix = postfix + " " + standby.top();
standby.pop();
}

/* Imprimir el posfijo */
cout << "Posfijo es: \n\t" << postfix << endl << endl;

/****************************************************************
 SEGUNDA PARTE: Procesar la cadena posfijo, y devolver resultado
****************************************************************/

A = 0;
cout << "Evaluando la expresion ..." << endl;
for ( i = 0; i < postfix.size(); i++ ) {

c = postfix[i];
token.clear();
token += c;

/* si se lee un operando (caracter numerico), depositar en la pila */
if ( c >= '0' && c <= '9' ) {
result.push( c - '0' );
continue;
}

/* si se lee un operador binario, poner en A y B los últimos dos argumentos
* de la pila y operarlos, guardando el resultado en la pila */
if ( is_operator( token ) ) {
if ( !result.empty() ) {
B = result.top();
result.pop();
}
else {
cout << "Argumentos insuficientes para '" << c << "'" << endl;
return -1;
}

if ( !result.empty() ) {
A = result.top();
result.pop();
}
else {
cout << "Argumentos insuficientes para '" << c << "'" << endl;
return -1;
}

cout << "\toperar " << A << token << B << " = ";
if ( token == "+" ) {
A += B;
result.push( A );
}
else if ( token == "-" ) {
A -= B;
result.push( A );
}
else if ( token == "*" ) {
A *= B;
result.push( A );
}
else if ( token == "/" ) {
A /= B;
result.push( A );
}
else if ( token == "%" ) {
A = (int )A % (int )B;
result.push( A );
}
else if ( token == "^" ) {
A = pow(A, B);
result.push( A );
}
cout << A << endl;
}
}

if ( !result.empty() )
cout << endl << "El resultado es: " << result.top() << endl;

return 0;
}

/* Verdadero si el token corresponde a un operador. */
bool is_operator( const string token ) {

for ( int i = 0; i < N_operators; i++ )
if ( operators[i] == token )
return true;

return false;
}

/* Devuelve la precedencia del operador descrito por el
 * string token (-1 si no es un operador) */
int precedence( const string token ) {

for ( int i = 0; i < N_operators; i++ )
if ( operators[i] == token )
return precedences[i];

return -1;
}

Infija a Posfija resolviendo la expresión con Resultado

Posted by : Jason
jueves, 12 de enero de 2017
0 Comments
En una PILA ingresaremos caracteres y números a una pila con las funciones Agregar, Eliminar, Mostrar y Destruir la pila.


Código:

#include<iostream>
#include<cstdlib>
using namespace std;

struct nodo{
    char let;// usamos char para poder obtener los caractere para la pila
    struct nodo *sgte;
};

typedef struct nodo *Puntero;

class Pila{
    public:
        Pila(void);
        void Apilar(int );
        int Desapilar(void );
        void tope(void);
        bool PilaVacia(void);
        void MostrarPila(void);
        void DestruirPila(void);

    private:
        Puntero Tope;

};
Pila::Pila(void){
    Tope=NULL;
}

bool Pila::PilaVacia(void){
    if(Tope==NULL)
        return true;
    else
        return false;
}

void Pila::Apilar(int x){

    Puntero p_aux;
    p_aux=new(struct nodo);
    p_aux->let=x;
    p_aux->sgte=Tope;
    Tope=p_aux;

}

//eliminara el elemento del tope de la pila ingresado
int Pila::Desapilar(void){
    int x;
    Puntero p_aux;
    if(Tope==NULL)
        cout<<"\n\n\tLa Pila esta Vacia.";
    else{
        p_aux=Tope;
        x=p_aux->let;
        Tope=Tope->sgte;
        delete(p_aux);
    }
    return x;
}
//NOS MOSTRARA TOTODS LOS ELELMENTOS INGRESADOS ASI COMO LOS CARACTERES Y NUMEROS EN LA PILA
void Pila::MostrarPila(void){
    Puntero p_aux;
    p_aux=Tope;

    while(p_aux!=NULL){
        cout<<"\t\t\t "<<p_aux->let<<endl;
        p_aux=p_aux->sgte;
    }
}
//DESTRUYE LA PILA POR COMPLETAMENTE DEGANDOLA VACIA.
void Pila::DestruirPila(void){
    Puntero p_aux;

    while(Tope!=NULL){
            p_aux=Tope;
            Tope=Tope->sgte;
            delete(p_aux);
    }
}

void menu(void)
{

    cout<<"\n\t        PILA CON CARACTERES Y NUMERSO      \n\n";
    cout<<" \t  1. AGREGAR A LA PILA "<<endl;
    cout<<" \t  2. ELIMINAR DE LA PILA "<<endl;
    cout<<" \t  3. MOSTRAR PILA    "<<endl;
    cout<<" \t  4. DESTRUIR PILA       "<<endl;
    cout<<" \t  5. SALIR        "<<endl;
    cout<<"\t ESCOGA UNA OPCION: ";
}

int main(void ){
//clolor de pantalla
    system("color f9");
    Pila pila;
    char x;
    int op;

    do
    {
        menu();  cin>> op;

        switch(op)
        {
            case 1: cout<< "\n\t INGRESE NUMERO Para la PILA: "; cin>> x;
                    pila.Apilar(x);
                    cout<<"\n\n\t\tNumero ( " << x << " ) agregado en la pila.\n\n";
                    break;

            case 2:
                    if(pila.PilaVacia()==true)
                        cout<<"\n\n\tLa Pila esta Vacia.";
                    else{
                        x = pila.Desapilar( );
                        cout<<"\n\n\tNumero ( "<<x<<" ) eliminado de la PILA\n";
                        }
                    break;


            case 3:
                    cout << "\n\n\t\t MOSTRANDO LA PILA\n\n";
                    if(pila.PilaVacia()!=true)
                        pila.MostrarPila(  );
                    else
                        cout<<"\n\n\tLa Pila esta Vacia."<<endl;
                    break;


            case 4:
                    pila.DestruirPila(  );
                    cout<<"\n\n\t\tPila ha DESTRUIDA\n\n";
                    break;

         }

        cout<<endl<<endl;
        system("pause");
        system("cls");

    }while(op!=5);

return 0;
}


Pilas C/C++ - Pila con caracteres

Posted by : Jason 2 Comments
Mediante una matriz saber cual es el numero Mayor y Menor y mostrar la matriz de los elementos ingresados.


Código:

#include<iostream>
#include<iomanip>
#include<stdlib.h>
using namespace std;

void ingresar(float A[50][50],int n, int m);
void mostrar(float A[50][50],int n, int m);
void mayor(float A[50][50],int n, int m);
void menor(float A[50][50],int n, int m);

int main()
{
 system("cls");
// system("color A0");

 int n,m;
 float A[50][50];

 cout<<"\n\n\t- INGRESA FILAS    :  ";
 cin>>n;

 cout<<"\n\t- INGRESA COLUMNAS :  ";
 cin>>m;

 ingresar(A,n,m);
 mostrar(A,n,m);
 mayor(A,n,m);
 menor(A,n,m);

 cout<<endl<<endl;
 system("pause");
}




void ingresar(float A[50][50],int n, int m)
{

 for(int i=0;i<n;i++)
    for(int j=0;j<m;j++)
      {
    cout<<endl<<"\t\t\t\t -  ["<<i<<"]"<<"["<<j<<"] =";
    cin>>A[i][j];
      }
}


void mostrar(float A[50][50],int n, int m)
{
 cout<<"\n\n\t Matriz  = \n";

 for(int i=0;i<n;i++)
    {
    cout<<endl<<"\n\t\t";
    for(int j=0;j<m;j++)
      {
       cout<<" "<<setw(4)<<A[i][j];
      }
}
}


void mayor(float A[50][50],int n, int m)
{

 float mayor=A[0][0];

 for(int i=0;i<n;i++)
    for(int j=0;j<m;j++)
      {
    if(A[i][j]>mayor)
    mayor=A[i][j];
       }
    cout<<"\n\n\n\t\t\tEL MAYOR = "<<mayor;
}


void menor(float A[50][50],int n, int m)
{

 float menor=A[0][0];

 for(int i=0;i<n;i++)
    for(int j=0;j<m;j++)
      {
    if(A[i][j]<menor)
        menor=A[i][j];
       }
    cout<<"\n\n\t\t\tEL MENOR = "<<menor;
}

Menor y Mayor mediante una matriz c/c++

Posted by : Jason
viernes, 30 de diciembre de 2016
0 Comments
Hoy vamos a hacer un programa en que el elemento A y B se ingresen #n cantidad de elementos y que nos de al final un elemento C de cual es la intersección de los elementos A y B.


Codigo:

#include<iostream>
#include<stdlib.h>
using namespace std;

int contador = 0;

int *Ingresar( int *A , int N)
{
 A = new int [100];

 for( int i = 0 ; i < N ; i++ )
     {
      cout<<"\n\t\t\t - ["<<i+1<<"] : ";
      cin>>A[i];
     }

 return A;
      
}


int *Interseccion( int *A , int *B , int *C , int N ,int M )
{

 C = new int [100];
  
 for( int i = 0 ; i < N ; i++ )
     for( int j = 0 ; j < M ; j++ )
         if ( A[i] == B[j])
             {
              C[contador++] = A[i];
            } 
            
  if ( contador == 0)          
       return 0;
  else          
       return C;
}



void Mostrar( int *A , int N)
{

 cout<<" "<<A[0];

 for( int i = 1 ; i < N ; i++ )
      cout<<" , "<<A[i];
      
}


int main()
{
 int N, M;

 int *A = NULL;
 int *B = NULL;
 int *C = NULL;

 cout<<"\n\n\t  Primer Conjunto  : ";
 cin>>N;

 A = Ingresar(A , N);
 cout<<"\n\n\t\t  A = { ";
 Mostrar(A,N);
 cout<<" } \n\n";


 cout<<"\n\n\t  Segundo Conjunto : ";
 cin>>M;

 B = Ingresar(B , M);
 cout<<"\n\n\t\t  B = { ";
 Mostrar(B,M);
 cout<<" } \n\n";


 C = Interseccion( A , B , C , N , M );
 cout<<"\n\n\t\t Interseccion  C = { ";
 Mostrar(C,contador);
 cout<<" } \n\n";

 cout<<endl<<endl;
 system("pause");
 return 0;
}



Interseccion de conjutos c/c++

Posted by : Jason 0 Comments

Esta vez Trabajaremos en Excel ya sea 2007-2010-2013 realizaremos un código de registro en el cual llenaremos las celdas al llenar los campos del registro y nos calculara automáticamente la edad.

1.- llenar los campos de Nombres, Apellidos, Cédula, Fecha de Nacimiento, Edad( La edad sera calculada automáticamente al momento de pasar los datos ingresados al campo de las celdas.

2.- Informar al usuario si desea guardar los datos.

3.- una ves confirmado el guardar informar si el año es bisiesto o no.



Código enVisual Basic (Excel )

Private Sub CommandButton1_Click()
Dim NOMBRE, APELLIDO, CEDULA, FECHA_NACIMIENTO As String
Dim REGISTRO As Double
Dim FECHA As Date, EDAD, I, J As Integer
Dim MES, DIA, ANIO As String
Dim bEscribe1, bEscribir2 As Boolean
'Inicializamos las variables para revisar la fila vacias
I = 1
J = 2
bEscribe1 = False
bEscribe2 = False


'mid substrae una subcadena de una cadena

NOMBRE = TextBox1.Value
APELLIDO = TextBox2.Value
CEDULA = TextBox3.Value
FECHA_NACIMIENTO = TextBox4.Value
MES = Mid(FECHA_NACIMIENTO, 4, 2)
DIA = Mid(FECHA_NACIMIENTO, 1, 2)
ANIO = Mid(FECHA_NACIMIENTO, 7, 4)

'trim buscar espacio en blanco para colocarlos en un orden


Do While bEscribe1 = False
If Trim(Hoja1.Cells(I, 1)) = "" And Trim(Hoja1.Cells(I, 2)) = "" And Trim(Hoja1.Cells(I, 3)) = "" And Trim(Hoja1.Cells(I, 4)) = "" And Trim(Hoja1.Cells(I, 5)) = "" Then
bEscribe1 = True
Else
I = I + 1
End If
Loop

Do While bEscribe2 = False
If Trim(Hoja2.Cells(J, 1)) = "" And Trim(Hoja2.Cells(J, 2)) = "" And Trim(Hoja2.Cells(J, 3)) = "" And Trim(Hoja2.Cells(J, 4)) = "" And Trim(Hoja2.Cells(J, 5)) = "" Then
bEscribe2 = True
Else
J = J + 1
End If
Loop

'len mide una cadena

If Len(FECHA_NACIMIENTO) = 10 Then

If MES >= 1 And MES <= 12 And DIA >= 1 And DIA <= 31 And ANIO >= 1 And ANIO <= Year(Date) Then
FECHA = CDate(TextBox4)
EDAD = CInt((Date - FECHA) / 365)
a = MsgBox("CONFIRMAR GUARDAR DATOS", vbOKCancel, "AVISO")
If a = 1 Then
If MES = 12 Then
Hoja2.Cells(J, 1) = NOMBRE
Hoja2.Cells(J, 2) = APELLIDO
Hoja2.Cells(J, 3) = CEDULA
Hoja2.Cells(J, 4) = FECHA_NACIMIENTO
Hoja2.Cells(J, 5) = EDAD
Else
Hoja1.Cells(I, 1) = NOMBRE
Hoja1.Cells(I, 2) = APELLIDO
Hoja1.Cells(I, 3) = CEDULA
Hoja1.Cells(I, 4) = FECHA_NACIMIENTO
Hoja1.Cells(I, 5) = EDAD
End If
'calculo del año

TextBox4.Text = Year(TextBox4.Text)
año = TextBox4.Text
If año Mod 100 = 0 Then
Bisiesto = (año Mod 400 = 0)
Else
Bisiesto = (año Mod 4 = 0)
End If
If Bisiesto = True Then
MsgBox ("AÑO ES BISIESTO")
Else
MsgBox ("AÑO NO ES BISIESTO")
End If
TextBox1.Text = Empty
TextBox2.Text = Empty
TextBox3.Text = Empty
TextBox4.Text = Empty
TextBox1.SetFocus
Else
MsgBox ("GRACIAS, LA INFORMACION NO SE GUARDO")
End If
Else
MsgBox ("ERROR, EN LA FECHA INGRESADA")
End If
Else
MsgBox ("ERROR EL FORMATO DE LA FECHA DEBE SER DD/MM/AAAA")
End If

End Sub
Private Sub CommandButton2_Click()
a = MsgBox("DESEA SALIR?", vbOKCancel, "AVISO")
If a = 1 Then
End
End If
End Sub
Private Sub CommandButton3_Click()
TextBox1.Text = Empty
TextBox2.Text = Empty
TextBox3.Text = Empty
TextBox4.Text = Empty

End Sub

Private Sub Label1_Click()

End Sub

Private Sub Label5_Click()

End Sub



Simular Registro (Excel 2016) Code VB

Posted by : Jason
lunes, 5 de diciembre de 2016
0 Comments
En este programa veremos utilizando las clases para crear operadores en que el usuario ingrese dos números cualquiera.


Codigo: 

#include <iostream>
#include <stdlib.h>
using namespace std;
class Operaciones{
public:
    int a;
    int b;
    void set_a_b(int n1, int n2);
    void suma();
    void resta();
    void multiplicacion();
    void divicion();
};

void Operaciones::set_a_b(int n1, int n2)
{
    cout<<"Ingrese valores para LAS OPERACIONES: "<<endl;
    cin>>n1;  cin>>n2;  
cout<<"\n\t\t\t Resultados\n"<<endl;
a=n1;
    b=n2;
}

void Operaciones::suma()
{
    cout<<"\n\t lA SUMA DE "<<a<<" + "<<b<<" ES: "<<a+b<<"\n";
}

void Operaciones::resta()
{
    cout<<"\n\t lA RESTA DE "<<a<<" - "<<b<<" ES: "<<a-b<<"\n";
}

void Operaciones::divicion()
{
    cout<<"\n\t lA DIVISION DE "<<a<<" / "<<b<<" ES: "<<a/b<<"\n";
}

void Operaciones::multiplicacion()
{
    cout<<"\n\t lA MULTIPLICACION DE "<<a<<" * "<<b<<" ES: "<<a*b<<"\n";
}

int main()
{
 system("color f9");
   Operaciones op;

   op.set_a_b('a','b');

   op.suma();

   op.resta();

   op.multiplicacion();

   op.divicion();
   
    return 0;
}


Clases de operadores

Posted by : Jason
domingo, 27 de noviembre de 2016
0 Comments
Veremos cómo definir una CLASE, funciones miembro crear OBJETOS de la clase, datos privados y públicos.



Código:

#include <stdlib.h>
#include <iostream>

using namespace std;

class Calendario{
private:
int dias;
char meses[15];
int semana;
int anio;
public:
void recibirDia(){
cout<<"\n\t Dia: "; cin>>dias;
}
void recibirMeses(){
cout<<"\t Mes: "; cin>>meses;
}
void recibirSemana(){
cout<<"\t Semana: "; cin>>semana;
}
void recibirAnio(){
cout<<"\t Anio: "; cin>>anio;
}
void dis(){
cout<<"\n\t  Dia es "<<dias<<"\n";
}
void mess(){
cout<<"\t  Mes es "<<meses<<"\n";
}
void seman(){
cout<<"\t  Semana es "<<semana<<"\n";
}
void any(){
cout<<"\t  Anio es "<<anio<<"\n";
}
};



int main(){
system("color f3");
cout<<"\n\t\t\t EJERCICIO 16 OBJETO CALENDARIO \n"<<endl;
Calendario calen;
calen.recibirDia(); 
calen.recibirMeses(); 
calen.recibirSemana();
calen.recibirAnio();
calen.dis();
calen.mess();
calen.seman();
calen.any();

return 0;
}





Objetos y Clases c++

Posted by : Jason
sábado, 12 de noviembre de 2016
0 Comments

- Copyright © Jason Igneel -