Mostrando entradas con la etiqueta ejercicio resuelto. Mostrar todas las entradas
Mostrando entradas con la etiqueta ejercicio resuelto. Mostrar todas las entradas

domingo, 31 de agosto de 2014

Matriz de la relación predecesor inmediato en c++. – Email – Lawyers – Law Firm – Registros

matriz de la relacion predecesor inmediato

Cuando aprendemos sobre reticulados nos enseñan un algoritmo para conseguir lamatriz de la relación de predecesores inmediatos de un CPO (Conjunto Parcialmente Ordenado) a partir de la matriz de la relación de orden [A,] donde A tiene n elementos.

El algoritmo sería el siguiente:

-Se calcula la matriz de la relación de orden M.

-Determinamos la matriz M = M- In . M es igual a la matriz de relación de orden menos la matriz identidad.

-Calculamos M^2 (M al cuadrado = MxM) haciendo una multiplicación binaria. Es decir, la matriz resultante solo contendrá unos y ceros como entradas.

-Hallamos M = M - M^2 (matriz de la relación predecesor inmediato). La matriz de la relación predecesor inmediato es igual a la matriz M menos la matriz M^2.

Ejercicio de ejemplo:

Dado el CPO [A, /] en dondeA = {200,60,30,10,5,1} y"/" es la relación binaria dedivisibilidad enA, (a/b si y sólo si "a" divide a "b") entonces: Hallar lamatriz de predecesores inmediatos.

Siguiendo el algoritmo calculamos la matriz M:
M=


1 divide a todo número real, por ello todas las entradas de esta fila de la matriz son 1.
5 divide a 5, 10, 30,60,200.
10 divide a 10,30,60,200.
30 divide a 30 y 60.
60 divide a 60.
200 divide a 200.

Siguiente paso, calculamos la matriz M que esta dada por M = M- In.

M=


In =


M = M- In

M =



Luego, calculamos M^2:

M^2 = M x M

X

M^2 =



Finalmente, hallamos la matriz de la relación predecesor inmediato.

M = M - M^2

M =





Una buena opción es desarrollar este algoritmo en algún lenguaje de programación que conozcamos, con el fin de aprender un poco más y a su vez comprobar los ejercicios que realizamos en nuestras horas de estudio. Este algoritmo lo podemos desarrollar enc++ de la siguiente forma:

#include iostream

using namespace std;

int main(){
int filas, colum;
cout "Ingrese la cantidad de filas de la matriz de la relación de orden: " endl;
cin filas;
cout "Ingrese la cantidad de columnas de la matriz de la relación de orden: " endl;
cin colum;
int matrizRO[filas][colum]; //matriz de relación de orden
int matrizRO2[filas][colum];
int matrizm2[filas][colum];
int matrizPI[filas][colum];
// Ingresamos las entradas de la matriz de relación de orden
cout "Ingrese las entradas de la matriz de la relación de orden" endl;
for(int i = 0; i filas; i++){
for(int j = 0; j colum; j++){
cout "Ingrese la entrada a" i j endl;
cin matrizRO[i][j];
}
}
// Restamos la matriz identidad a nuestra matriz
for(int diagonal = 0; diagonal colum; diagonal++)
{
matrizRO[diagonal][diagonal] = 0;
}

//Imprimimos el valor de M

cout "Matriz M: " endl;
for(int i = 0; i filas; i++){
for(int j = 0; j colum; j++){
cout matrizRO[i][j] " ";
}
cout endl;
}

//segunda matriz

for(int i = 0; i filas; i++){
for(int j = 0; j colum; j++){
matrizRO2[i][j] = matrizRO[i][j];
}
}

//

//Calculamos M^2 (Binarizada)
for(int i=0;ifilas;i++){
for(int j=0;jcolum;j++){
matrizm2[i][j]=0;
for(int k=0;kcolum;k++){
if(matrizRO[i][k] == 1 and matrizRO2[k][j] == 1)
matrizm2[i][j] = 1;
}
}
}
// Imprimimos M^2
cout "Matriz M^2: " endl;
for(int i = 0; i filas; i++){
for(int j = 0; j colum; j++){
cout matrizm2[i][j] " ";
}
cout endl;
}

//Calculamos la matriz de la relación predecesor inmediato

for(int i = 0; i filas; i++){
for(int j = 0; j colum; j++){
matrizPI[i][j] = matrizRO[i][j] - matrizm2[i][j];
}
}

//Imprimimos la matriz de la relación predecesor inmediato

cout "Matriz de la relación predecesor inmediato: " endl;
for(int i = 0; i filas; i++){
for(int j = 0; j colum; j++){
cout matrizPI[i][j] " ";
}
cout endl;
}

return 0;
}

int matrizRO[filas][colum]; //matriz de relación de orden
int matrizRO2[filas][colum];
int matrizm2[filas][colum];
int matrizPI[filas][colum];

La matrizRO representa la matriz de relación de orden, la matrizRO2 contiene las mismas entradas que la anterior, esta se usará solo para realizar la multiplicación para obtener M^2.
La matrizm2 representa la matriz M^2.
La matrizPI representa la matriz de la relación de predecesores inmediatos.

int filas, colum;
cout "Ingrese la cantidad de filas de la matriz de la relación de orden: " endl;
cin filas;
cout "Ingrese la cantidad de columnas de la matriz de la relación de orden: " endl;
cin colum;

Inicialmente ingresamos la cantidad de filas y columnas que tiene nuestra matriz. Dicha matriz es una matriz cuadrada de orden nxn.

// Restamos la matriz identidad a nuestra matriz
for(int diagonal = 0; diagonal colum; diagonal++)
{
matrizRO[diagonal][diagonal] = 0;
}

Para encontrar el valor de M solo debemos anular la diagonal principal de nuestra matriz.

//Calculamos M^2 (Binarizada)
for(int i=0;ifilas;i++){
for(int j=0;jcolum;j++){
matrizm2[i][j]=0;
for(int k=0;kcolum;k++){
if(matrizRO[i][k] == 1 and matrizRO2[k][j] == 1)
matrizm2[i][j] = 1;
}
}
}

Calculamos M^2 con el anterior algoritmo, tomar en cuenta que como es una matriz binarizada solo tendrá ceros y unos. Al conseguir una coincidencia de dos 1 almacenamos 1 en la matriz M^2.

//Calculamos la matriz de la relación predecesor inmediato

for(int i = 0; i filas; i++){
for(int j = 0; j colum; j++){
matrizPI[i][j] = matrizRO[i][j] - matrizm2[i][j];
}
}

Calculamos la matriz de la relación de predecesor inmediato con la diferencia entre la matriz M y M^2.

Resolviendo el ejercicio anterior con nuestro programa de consola hecho en c++, ésta sería su ejecución:

Ingrese la cantidad de filas de la matriz de la relación de orden:
6
Ingrese la cantidad de columnas de la matriz de la relación de orden:
6
Ingrese las entradas de la matriz de la relación de orden
Ingrese la entrada a00
1
Ingrese la entrada a01
1
Ingrese la entrada a02
1
Ingrese la entrada a03
1
Ingrese la entrada a04
1
Ingrese la entrada a05
1
Ingrese la entrada a10
0
Ingrese la entrada a11
1
Ingrese la entrada a12
1
Ingrese la entrada a13
1
Ingrese la entrada a14
1
Ingrese la entrada a15
1
Ingrese la entrada a20
0
Ingrese la entrada a21
0
Ingrese la entrada a22
1
Ingrese la entrada a23
1
Ingrese la entrada a24
1
Ingrese la entrada a25
1
Ingrese la entrada a30
0
Ingrese la entrada a31
0
Ingrese la entrada a32
0
Ingrese la entrada a33
1
Ingrese la entrada a34
1
Ingrese la entrada a35
0
Ingrese la entrada a40
0
Ingrese la entrada a41
0
Ingrese la entrada a42
0
Ingrese la entrada a43
0
Ingrese la entrada a44
1
Ingrese la entrada a45
0
Ingrese la entrada a50
0
Ingrese la entrada a51
0
Ingrese la entrada a52
0
Ingrese la entrada a53
0
Ingrese la entrada a54
0
Ingrese la entrada a55
1
Matriz M:
0 1 1 1 1 1
0 0 1 1 1 1
0 0 0 1 1 1
0 0 0 0 1 0
0 0 0 0 0 0
0 0 0 0 0 0
Matriz M^2:
0 0 1 1 1 1
0 0 0 1 1 1
0 0 0 0 1 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
Matriz de la relación predecesor inmediato:
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 1
0 0 0 0 1 0
0 0 0 0 0 0
0 0 0 0 0 0

Optimizando el algoritmo en c++:

El código fuente del algoritmo hecho en c++ está escrito con el mayor detalle posible con el fin de que pueda ser entendido fácilmente. Sin embargo, este puede ser optimizado evitando la creación de algunas matrices no tan necesarias y algunos ciclos repetitivos for. Esto con el fin de minimizar el tiempo de ejecución y reducir el espacio utilizado en la memoria.

#include iostream

using namespace std;

int main(){
int n;
char respuesta;
do{
cout "Ingrese el valor de n para su matriz de orden nxn " endl;
cin n;
int matrizR[n][n]; //matriz de relación de orden y luego de la relación predecesor inmediato.
int matrizm2[n][n];
// Ingresamos las entradas de la matriz de relación de orden
cout "Ingrese las entradas de la matriz de la relación de orden" endl;
for(int i = 0; i n; i++){
for(int j = 0; j n; j++){
cout "Ingrese la entrada a" i j endl;
cin matrizR[i][j];
//Anulando diagonal principal al momento de ingresar la matriz
if(i == j)
matrizR[i][j] = 0;
}
}

//Calculamos M^2 (Binarizada)
for(int i=0;in;i++){
for(int j=0;jn;j++){
matrizm2[i][j]=0;
for(int k=0;kn;k++){
if(matrizR[i][k] == 1 and matrizR[k][j] == 1){
matrizm2[i][j] = 1;
            break;
            }
}
}
}

//Calculamos la matriz de la relación predecesor inmediato y la imprimimos al mismo tiempo
cout "Matriz de la relación predecesor inmediato:" endl;
for(int i = 0; i n; i++){
for(int j = 0; j n; j++){
matrizR[i][j] = matrizR[i][j] - matrizm2[i][j];
cout matrizR[i][j] " ";
}
cout endl;
}
cout "Desea obtener una nueva matriz de la relación predecesor inmediato a partir de otra matriz de relación de orden? si = s no = n" endl;
cin respuesta;
}while(respuesta == 's');
return 0;
}

Inicialmente ingresamos el valor de n, la matriz de la relación de orden es una matriz cuadrada de orden nxn.

Mientras ingresamos las entradas o componentes de la matriz podemos ir anulando automática la diagonal principal, esto lo hacemos cuando los índices i y j son iguales.

if(i == j)
matrizR[i][j] = 0;

Para obtener la matriz M^2 solo necesitaremos conseguir un 1, recordemos que esta matriz debe estar binarizada. Por ello le agregamos el break al ciclo de manera que cuando encuentre un 1 salga del ciclo y no ejecute instrucciones innecesarias.

if(matrizR[i][k] == 1 and matrizR[k][j] == 1){
matrizm2[i][j] = 1;
break;
}

Al momento de obtener la matriz de la relación predecesor inmediato podemos guardar el resultado en la misma matriz inicial, además podemos ir imprimiendo los resultados en paralelo se van obteniendo.

for(int i = 0; i n; i++){
for(int j = 0; j n; j++){
matrizR[i][j] = matrizR[i][j] - matrizm2[i][j];
cout matrizR[i][j] " ";
}
cout endl;
}

Descarga del código fuente del proyecto:
http://www.mediafire.com/download/urr...


También te podría interesar:
4 Ejercicios Básicos de Programación Orientada a Objetos en c++
De sistema decimal a sistema binario en c++ y Java
3 libros sobre programacion orientada a objetos
[Ejercicio resuelto c++ POO Herencia Vectores MVC] Una Asociación de Lancheros trasladan turistas

injury lawyers west palm beach online motor insurance quotes Learning adobe illustrator Casino reviews Online casino Make money online Australia STRUCTURED ANNUITY SETTLEMENT Business management software structured settlement buyer semi truck accident lawyers asterisk call center software Asbestos Lawyers Bankruptcy lawyer ONLINE MOTOR INSURANCE QUOTES mesothelioma law suits CAR ACCIDENT LAWYERS best criminal lawyer in arizona Service business software Custom Christmas cards mesothelioma attorney florida Casino Donate car for tax credit Cheap Car Insurance in Virginia MORTGAGE ADVISER mesotheolima Business finance group Psd to html Massage school Dallas Texas Cheap Domain Registration Hosting what is structured settlement Car Insurance Quotes Utah MASSAGE SCHOOL DALLAS TEXAS student loan consolidation program Donate old cars to charity Online Motor Insurance Quotes Tech school Online Christmas cards Dwi lawyer Injury Lawyers structured settlement cash out fortis health insurance temporary Proud Italian cook Php programmers Forex Trading Platform Mobile casino ashely madis mesothelioma symptoms truck accident attorney los angeles sell annuity payment Donate Cars in MA Auto Mobile Insurance Quote cash out structured settlement Php programmers for hire Html email bus accident attorneys Photo Christmas cards car insurance quotes colorado Seo services PhD in counseling education car accident lawyers west palm beach Live casino DUI lawyer Hire php developers Psd to WordPress Car Insurance Quotes MN CRIMINAL DEFENSE ATTORNEYS FLORIDA workers compensation lawyer los angeles HARDDRIVE DATA RECOVERY SERVICES LIFE INSURANCE CO LINCOLN Computer science classes online Social media platforms for business Hire php programmers Criminal lawyer car donate Annuity Settlements ASBESTOS LAWYERS MET AUTO personal injury attorney springfield mo supportpeachtreecom Criminal defense lawyer Donate your Car for Money Hard drive Data Recovery Services benchmark lending Hire php developer Paperport Promotional Code Seo companies Asbestos Lung Cancer Best Criminal Lawyers in Arizona Seo company World Trade Center Footage Best social media platforms for business Custom WordPress theme designer New social media platforms canada personals yahoo Online Criminal Justice Degree life insurance quotes HOW TO DONATE A CAR IN CALIFORNIA buyer of structured settlement annuity mesothelioma lawyer dallas saskatchewan auto insurance yahoo web hosting ANNUITY SETTLEMENT houston tx auto insurance Donate Your Car for Kids Donating Used Cars to Charity colorado auto accident attorney Best Seo company mesothelioma ct How to donate a car in California best consolidation loan student Best social media platforms Social media examiner Psychic for Free Health Records Personal Health Record donating used cars to charity mesothelioma trial attorney Donate your car Sacramento cheap domain registration hosting mesothelioma lawsuit Adobe illustrator classes uk homeowner loans PAPERPORT PROMOTIONAL CODE Cheap Auto Insurance in VA CAR INSURANCE QUOTES MN CHEAP CAR INSURANCE IN VIRGINIA new mexico mesothelioma lawyer california motorcycle accident lawyer motor replacements WordPress themes for designers Car Insurance Quotes Colorado WordPress hosting accident attorney in los angeles PHD on Counseling Education bus accident attorney los angeles tucson car accident attorney motorcycle accident attorney chicago Social media management home phone internet bundle Social media platforms primary pulmonary hypertension Christmas cards FUTURISTIC ARCHITECTURE buying an annuity calculator CHEAP AUTO INSURANCE IN VA Neuson Motor Replacements Donating a car in Maryland phd in counseling education Donate a Car in Maryland Italian cooking school structured settlements companies See more at http//wwwginfostopnet/ email bulk service online criminal justice degree WordPress theme designers Social media strategies personal injury firm Social media tools Donate Car to Charity California auto accident attorney structured settlement purchasers Car Insurance in South Dakota Social media campaigns Mesothelioma Law Firm Donate Car for Tax Credit Forensics Online Course Online colledges car accident lawyer san bernardino dui lawyer scottsdale offshore accident lawyer Donate Your Car Sacramento How to Donate A Car in California Sell Annuity Payment Online motor insurance quotes Structures Annuity Settlement car insurance companies washington mesothelioma attorney adverse credit remortgage Nunavut Culture Dayton Freight Lines Insurance Companies Virtual Data Rooms best mesothelioma lawyers adverse remortgage Data Recovery Raid Donating a Car in Maryland Donate Cars Illinois Criminal Defense Attorneys Florida domain registration yahoo Business VOIP Solutions structured settlement sell DONATE CARS IN MA AUTOMOBILE ACCIDENT ATTORNEY motorcycle accident lawyer san francisco michigan motorcycle accident lawyer Life Insurance Co Lincoln earthlink business internet Motor replacements asbestos lawyers Holland Michigan College Online Colleges mesothelioma settlement amounts Automobile Accident Attorney Online Classes motor insurance quotes Royalty free images stock Car Insurance Companies Massage School Dallas Texas FORENSICS ONLINE COURSE Dedicated Hosting Dedicated Server Hosting Donate Old Cars to Charity Low Credit Line Credit Cards Cheap car insurance for ladies Car Insurance Quotes PA Dallas Mesothelioma Attorneys mesothelioma lawyer virginia accident car florida lawyer criminal defense federal lawyer selling my structured settlement asbestos lung cancer la personal injury lawyer CHEAP CAR INSURANCE FOR LADIES donate your car for kids Met Auto Home Phone Internet Bundle futuristic architecture NEUSON dallas mesothelioma lawyer royalty free images stock EMAIL BULK SERVICE illinois law lemon Royalty Free Images Stock Email Bulk Service MOTOR REPLACEMENTS Webex Costs Cheap Car Insurance for Ladies buy gift card Register free domains Register Free Domains car accident lawyers los angeles Better Conference Calls Futuristic Architecture Mortgage Adviser Car Donate register free domains DONATE CARS ILLINOIS Online College Course Auto Accident Attorney mesothelioma attorney assistance Car Accident Lawyers

domingo, 3 de agosto de 2014

4 Ejercicios Básicos de Programación Orientada a Objetos en c++ – Virtual – Abogado


Sí te estas iniciando en la programación y enc++ utilizandoprogramación orientada a objetos seguro estos4 ejercicios te servirán. En la entrada he colocado el planteamiento de cada ejercicio junto al diagrama de clases de cada uno de ellos. Sí deseas realizar el ejercicio tu mismo, puedes hacerlo, a su vez puedes descargar la carpeta de cada uno de los proyectos y observar el código fuente para resolver tus dudas.

Ejercicio Número 1


Planteamiento:
Se conoce de unartículo su costo base y se sabe que se ofrecen 2 precios de venta: aldetal (30% de incremento del costo base) y almayor (15% de incremento del costo base). Se desea conocer los distintos PVP del artículo, al detal y al mayor.

Diagrama de clases:


Descarga código fuente del proyecto:
https://mega.co.nz/#!hQtkgT4D...

Ejercicio Número 2


Planteamiento:
Se conoce de unalumno:cédula,nombre y tres notas parciales (nota1, nota2, nota3). El programa debe imprimir: cédula, nombre, nota final e indique con un mensaje si el alumno aprobó (nota final = 48) o no aprobó (nota final 48) la asignatura.

Diagrama de clases:


Descarga código fuente del proyecto:
https://mega.co.nz/#!YIEVyASC...

Ejercicio Número 3


Planteamiento:
Dado laaltura y labase de unrectángulo, calcule su área (base * altura) y perímetro (2*base + 2*altura).

Diagrama de clases:


Descarga código fuente del proyecto:
https://mega.co.nz/#!tYVywYQS...

Ejercicio Número 4


Planteamiento:
Se conoce de unapersona elnombre, eldía,mes yaño de nacimiento, escriba un programa que lea la fecha de hoy, comodía,mes yaño e imprima el nombre de la persona y su edad.

Diagrama de clases:


Descarga código fuente del proyecto:

También te podría interesar:
  1. De sistema decimal a sistema binario en c++ y Java
  2. 3 libros sobre programacion orientada a objetos
  3. [Ejercicio resuelto c++ POO Herencia Vectores MVC] Una Asociación de Lancheros trasladan turistas
  4. [Ejercicio resuelto c++ POO Herencia MVC] Línea de autobuses “El Cardenalito”
  5. Cuenta regresiva de minutos y segundos con c++
  6. Escribir en bloc de notas con c++ [Archivo/Ficheros c++]
  7. Abrir una direccion web con c++



Online casino mesothelioma lawsuits register free domains Live casino How to donate a car in California Car Accident Lawyers Dayton freight lines online motor insurance quotes Casino donate your car for kids DONATE A CAR IN MARYLAND Mobile casino accident attorneys orange county MET AUTO buyers of structured settlements Make money online Australia Better Conference Calls motorcycle accident attorney chicago mesothelioma lawyer texas DUI lawyer structured settlement company domain registration yahoo car insurance in south dakota Hire php programmers Best Seo company CHEAP CAR INSURANCE IN VIRGINIA Dwi lawyer Hire php developer LIFE INSURANCE CO LINCOLN Tech school Italian cooking school truck accident attorney texas Adobe illustrator classes supportpeachtreecom CHEAP CAR INSURANCE FOR LADIES Cheap auto insurance in VA mesothelioma settlements amounts Best social media platforms for business Donate cars in ma business voice mail service NUNAVUT CULTURE Online Stock Trading hughes net business Casino reviews Royalty free images stock Online colledges Bankruptcy lawyer Html email Cheap car insurance in Virginia truck accident attorney los angeles domains yahoo Nunavut Culture federal criminal defense attorney benchmark lending harddrive data recovery services DAYTON FREIGHT LINES personal injury lawyer sarasota fl Hire php developers mesothelioma claims WORLD TRADE CENTER FOOTAGE car insurance quotes colorado Online Christmas cards Photo Christmas cards DONATE CAR FOR TAX CREDIT Criminal lawyer Life Insurance Co Lincoln Service business software selling structured settlement mesothelioma lawyer dallas buying an annuity calculator Car Insurance Quotes Utah Criminal Defense Attorneys Florida massage school dallas texas Criminal defense lawyer Forensics online course home phone internet bundle Php programmers for hire Car Insurance Quotes PA uk homeowner loans Donating Used Cars to Charity Psd to WordPress CAR INSURANCE IN SOUTH DAKOTA donate car for tax credit Seo companies sell annuity payment Business management software Social media management semi truck accident lawyers Donate Cars in MA life insurance quotes mesotheliama Computer science classes online Php programmers ASBESTOS LAWYERS city college in miami Cheap Domain Registration Hosting Donate Car for Tax Credit DONATE OLD CARS TO CHARITY Car Insurance Quotes CHEAP AUTO INSURANCE IN VA AUTO ACCIDENT ATTORNEY Email bulk service structured settlement sell michigan motorcycle accident lawyer New social media platforms chicago hair laser removal injury lawyers west palm beach injury lawyers Social media tools car insurance quotes mn WordPress theme designers Virtual Data Rooms google affiliate Custom Christmas cards Donate Cars Illinois mesothelioma lawsuit Business finance group Social media platforms for business purchase structured settlements dui lawyer scottsdale mesothelioma law firm donating used cars to charity anti spam appliance Donate a Car in Maryland DONATE CARS ILLINOIS Custom WordPress theme designer Seo services Online Colleges Asbestos Lung Cancer futuristic architecture WEBEX COSTS MOTOR REPLACEMENTS Best social media platforms Online College Course Sell Annuity Payment mesothelioma law suits HOLLAND MICHIGAN COLLEGE Attorney PHD on Counseling Education Psychic for free CAR INSURANCE QUOTES PA Seo company World Trade Center Footage dallas mesothelioma attorneys Social media strategies car donate personal injury firm mesothelioma personal injury lawyers WordPress themes for designers Psd to html Email Bulk Service WordPress hosting Donate car to charity California structured settlement buyer los angeles auto accident attorneys Social media examiner lease management software sell my structured settlement BEST CRIMINAL LAWYER IN ARIZONA Criminal lawyer Miami Auto Accident Attorney Social media platforms Christmas cards saskatchewan auto insurance Proud Italian cook business voip solutions Donate Your Car for Kids Car Insurance Quotes Colorado car accident lawyer michigan buying structured settlements DONATING USED CARS TO CHARITY DONATE YOUR CAR SACRAMENTO DONATING A CAR IN MARYLAND mesothelioma drug Learning adobe illustrator mesothelioma lawyer chicago Donate your Car for Money donate old cars to charity ashely madis Social media campaigns buy structured settlements compare life assurance Mesothelioma Law Firm Low Credit Line Credit Cards average mesothelioma settlement Donate Car to Charity California cash out annuity Structures Annuity Settlement Cheap Car Insurance in Virginia Donate Your Car Sacramento Donate Car To Charity CALIFORNIA How to Donate A Car in California domain yahoo HOW TO DONATE A CAR IN CALIFORNIA Asbestos Lawyers tennessee mesothelioma lawyer personal injury lawyer la personal injury lawyer phd in counseling education mesothelioma information paperport promotional code Annuity Settlements Dayton Freight Lines Hard drive Data Recovery Services DALLAS MESOTHELIOMA ATTORNEYS CHEAP DOMAIN REGISTRATION HOSTING Mortgage adviser NEUSON adverse credit remortgage ANNUITY SETTLEMENT Motor Replacements hair removal washington dc Donating a Car in Maryland PSYCHIC FOR FREE Best Criminal Lawyers in Arizona Business VOIP Solutions personal injury attorney springfield mo Online Classes new mexico mesothelioma lawyer los angeles motorcycle accident lawyer Auto Mobile Shipping Quote Holland Michigan College Forensics Online Course Massage School Dallas Texas Online Motor Insurance Quotes Paperport Promotional Code FUTURISTIC ARCHITECTURE dallas mesothelioma lawyer motor replacements hosted predictive dialers Psychic for Free workers compensation lawyer los angeles buy gift card DONATE YOUR CAR FOR MONEY Donate Old Cars to Charity Dallas Mesothelioma Attorneys Car Insurance Quotes MN Cheap Auto Insurance in VA Met Auto illinois mesothelioma lawyer Home Phone Internet Bundle mesothelioma lawyers san diego Neuson Royalty Free Images Stock Car Insurance in South Dakota Webex Costs Cheap Car Insurance for Ladies Register Free Domains Futuristic Architecture Mortgage Adviser

sábado, 31 de mayo de 2014

[Ejercicio resuelto Progranimate] Promedio de notas de una sección – Law Firm – Miami – Virtual


Planteamiento:
"Se conoce la cantidad de estudiantes de una sección y la nota de cada uno de ellos. Determinar el promedio de la sección."

Código fuente JavaScript:

script type="text/javascript"
//Program:Untitled

var cantidad = 0;
var i = 0;
var j = 0;
var nota = 0;
var AcumuladorNotas = 0;
var promedio = 0;

alert("Ingrese la cantidad de estudiantes de la sección");
cantidad = pronpt("","");

for ( i = 0 ; i cantidad ; i = i + 1 )
{
j = i + 1;
alert("Ingrese la nota numero " + j);
nota = pronpt("","");
AcumuladorNotas = AcumuladorNotas + nota ;
}//End For

promedio = AcumuladorNotas / cantidad ;
alert("El promedio de la sección es de: " + promedio);

//End of Program
/script

Diagrama de flujo:


Ejecución:

Ingrese la cantidad de estudiantes de la sección
5
Ingrese la nota numero 1
20
Ingrese la nota numero 2
11
Ingrese la nota numero 3
14
Ingrese la nota numero 4
17
Ingrese la nota numero 5
16
El promedio de la sección es de: 15.6


Casino workers compensation lawyer los angeles CAR INSURANCE QUOTES UTAH accident attorney orange county car insurance companies online colledges harddrive data recovery services Insurance Companies best mesothelioma lawyers mesotheioma Business finance group mesotheloma Criminal defense lawyer Annuity Settlements Car Insurance Quotes PA Met Auto Custom Christmas cards quotes car Online casino WordPress themes for designers Dedicated Hosting Dedicated Server Hosting Computer science classes online injury attorney baton rouge Online Colleges personal injury solicitor car insurance quotes colorado MESOTHELIOMA LAW FIRM auto accident attorney arizona auto accident attorney Mobile casino CAR INSURANCE QUOTES COLORADO mesothelioma lawyer texas Make money online Australia Hire php developer Social media strategies google affiliate Online motor insurance quotes MOTOR REPLACEMENTS fortis health insurance temporary Car Insurance Quotes Colorado injury lawyers Casino reviews Best social media platforms for business domain yahoo DALLAS MESOTHELIOMA ATTORNEYS Live casino mesothelioma charities Cheap Auto Insurance in VA DUI lawyer Forensics Online Course Injury Lawyers massage school dallas texas Automobile Accident Attorney Hire php developers Donate Cars in MA Webex Costs saskatchewan auto insurance domain name yahoo Futuristic Architecture Hire php programmers Tech school city college in miami donating used cars to charity benchmark lending structured settlement cash out selling structured settlement Dwi lawyer cheap car insurance in virginia Criminal lawyer Seo services Service business software donate old cars to charity Php programmers for hire state of california car insurance Motor Insurance Quotes Donating Used Cars to Charity Motor replacements CHEAP CAR INSURANCE IN VIRGINIA mesothelioma structured settlement company Nunavut culture DONATE YOUR CAR FOR MONEY Psychic for Free ONLINE COLLEDGES Seo company Bankruptcy lawyer emergency response plan ppt DONATE OLD CARS TO CHARITY sell annuity payment Best Criminal Lawyers in Arizona Donate Your Car for Kids Paperport promotional code new york mesothelioma law firm Php programmers Car Insurance Quotes MN mesothelioma information Social media management Christmas cards car accident lawyer san bernardino Mesothelioma Law Firm STRUCTURED ANNUITY SETTLEMENT Auto Mobile Shipping Quote lease management software Donate cars Illinois Mortgage Adviser Social media examiner Seo companies Low credit line credit cards New social media platforms asbestos lawyers CRIMINAL DEFENSE ATTORNEYS FLORIDA Social media platforms for business Custom WordPress theme designer DONATE YOUR CAR FOR KIDS business voip solutions Best Seo company Business management software what is structured settlement Best social media platforms att call conference Donate a Car in Maryland best criminal lawyer in arizona donate your car for money Online Christmas cards Psd to html WEBEX COSTS Photo Christmas cards Car Insurance Quotes WordPress hosting car crash attorneys Psd to WordPress florida car insurance company Cheap domain registration hosting mesothelioma attorney assistance Donate your car for money Html email Social media platforms offshore accident lawyer mesothelioma lawyer virginia Donate Car to Charity California Proud Italian cook criminal defense federal lawyer holland michigan college Dallas Mesothelioma Attorneys forensics online course buyer of structured settlement annuity Motor Replacements Life Insurance Co Lincoln Italian cooking school WordPress theme designers Adobe illustrator classes new mexico mesothelioma lawyer injury lawyers west palm beach MET AUTO mesothelioma trial attorney mesothelioma lawyer california Donating used cars to charity Royalty free images stock Business Voip Solutions motor insurance quotes Learning adobe illustrator Online Stock Trading domains yahoo Social media tools Social media campaigns car insurance in south dakota World Trade Center Footage Donate Car for Tax Credit DONATING A CAR IN MARYLAND DONATE YOUR CAR SACRAMENTO Dayton Freight Lines Virtual Data Rooms structured settlements annuities pharmacist jobs in chicago How to Donate A Car in California ROYALTY FREE IMAGES STOCK Donate Your Car Sacramento Sell Annuity Payment Donate Cars Illinois Asbestos Lawyers purchase structured settlements Structures Annuity Settlement annuity payment Nunavut Culture Hard drive Data Recovery Services Criminal lawyer Miami Car Accident Lawyers car accident lawyers los angeles Cheap Domain Registration Hosting Donating a Car in Maryland virtual data rooms Criminal Defense Attorneys Florida PHD on Counseling Education Car Insurance Quotes Utah Holland Michigan College Online Motor Insurance Quotes Paperport Promotional Code Online Classes cloud identity and access management houston tx auto insurance Massage School Dallas Texas Donate Old Cars to Charity DAYTON FREIGHT LINES HOME PHONE INTERNET BUNDLE Low Credit Line Credit Cards student loan consolidation program REGISTER FREE DOMAINS mesothelioma compensation Donate your Car for Money alcohol rehab center in florida car accident lawyers west palm beach cheap domain registration hosting Home Phone Internet Bundle Home phone internet bundle average mesothelioma settlement mortgage adviser Cheap Car Insurance for Ladies Neuson Royalty Free Images Stock mesotheolima structured settlement annuity companies Car Insurance in South Dakota Donate car for tax credit Email Bulk Service event management security google adsense Cheap Car Insurance in Virginia Register Free Domains Better Conference Calls Massage school Dallas Texas AUTO ACCIDENT ATTORNEY Claim cheaper insurance companies Car Donate Online College Course Auto Accident Attorney Data Recovery Raid SELL ANNUITY PAYMENT la personal injury lawyer hosted predictive dialers Personal Injury Lawyers Asbestos Lung Cancer Dallas mesothelioma attorneys Personal Injury Law Firm Online Criminal Justice Degree Car Insurance Companies truck accident attorney los angeles motorcycle accident attorney chicago canada personals yahoo selling annuity

[Ejercicio resuelto Progranimate] Determine sí la edad de una persona es mayor o igual a 18 – Forex – Promotional Code – Auto – Forex


Planteamiento:
"Se conoce la edad de una persona. Sí la edad es mayor o igual a 18 imprimir: "Mayor de edad", en caso contrario, imprimir: "Menor de edad"

Código fuente JavaScript:

script type="text/javascript"
//Program:Untitled

var edad = 0;

alert("Ingrese la edad de la persona");
edad = pronpt("","");

if (edad = 18 )
{
alert("Mayor de edad");
}//End If
else
{
alert("Menor de edad");
}//End Else


//End of Program
/script

Diagrama de flujo:


Ejecución:

Siendo la edad ingresada mayor o igual a 18:

Ingrese la edad de la persona
24
Mayor de edad

Siendo la edad ingresada menor a 18:

Ingrese la edad de la persona
15
Menor de edad


adverse credit remortgage Donating a Car in Maryland Hire php developers structered settlement hair removal washington dc california law lemon cash out annuity mesothelioma attorneys Dedicated Hosting Dedicated Server Hosting DONATE YOUR CAR FOR MONEY Best social media platforms for business DONATING A CAR IN MARYLAND CRIMINAL DEFENSE ATTORNEYS FLORIDA Html email mesothelioma personal injury lawyers Asbestos Lawyers benchmark lending Forex Trading Platform selling annuity payments for cash HARDDRIVE DATA RECOVERY SERVICES Online casino Donate Car to Charity California Seo company DONATE CARS IN MA Donate Car To Charity CALIFORNIA Donate Your Car for Kids anti spam exchange server selling annuity car insurance companies home phone internet bundle WordPress themes for designers Criminal defense lawyer refinance with poor credit Holland Michigan College ONLINE COLLEDGES Psd to WordPress Live casino state of california car insurance Donate Your Car Sacramento Futuristic Architecture Donate cars Illinois AUTO ACCIDENT ATTORNEY cell cycle regulation ppt structured settlement buyers Casino BEST CRIMINAL LAWYER IN ARIZONA Dayton freight lines Automobile Accident Attorney Mobile casino structured settlement sell harddrive data recovery services Car Insurance Quotes PA Computer science classes online Make money online Australia Neuson Casino reviews bus accident attorneys CAR INSURANCE QUOTES UTAH DUI lawyer emergency response plan ppt Criminal lawyer Social media management data recovery raid Hire php programmers Php programmers for hire Learning adobe illustrator los angeles auto accident attorneys meso lawyer mesothelioma settlements amounts Annuity Settlements mesothelioma lawyers san diego Car Insurance in South Dakota Health Records Personal Health Record Paperport Promotional Code accident attorney orange county Attorney Insurance Donate Car for Tax Credit Car Accident Lawyers Social media platforms for business Seo companies Tech school Dwi lawyer Bankruptcy lawyer Service business software Personal Injury Lawyers structured settlement agreement Social media strategies fortis health insurance temporary Gas/Electricity selling my structured settlement Best Seo company mesothelioma ct Hire php developer Car insurance quotes Utah mesothelioma compensation colorado auto accident attorney webex costs phd in counseling education Cheap Domain Registration Hosting Php programmers CHEAP CAR INSURANCE IN VIRGINIA personal injury accident lawyer structured settlements annuities Asbestos Lung Cancer VIRTUAL DATA ROOMS Met Auto Injury Lawyers Proud Italian cook New social media platforms MOTOR REPLACEMENTS car accident lawyers Donate your Car for Money Business finance group Psychic for Free Business management software Custom WordPress theme designer Seo services dallas mesothelioma lawyer mortgage adviser DONATE OLD CARS TO CHARITY holland michigan college online colledges Online College Course Donate your car Sacramento Best social media platforms Cheap car insurance in Virginia Online Christmas cards Custom Christmas cards Photo Christmas cards World Trade Center Footage Dallas Mesothelioma Attorneys WordPress hosting Cheap Car Insurance in Virginia Social media examiner structured settlement quote Nunavut Culture Business VOIP Solutions Social media platforms structured settlement brokers Christmas cards Psd to html truck accident attorney texas Motor Replacements Italian cooking school WordPress theme designers Adobe illustrator classes SELL ANNUITY PAYMENT saskatchewan auto insurance Donate Old Cars to Charity Social media tools Social media campaigns Mesothelioma Law Firm Webex Costs Low Credit Line Credit Cards cheap domain registration hosting FUTURISTIC ARCHITECTURE Donate Cars in MA How to Donate A Car in California Sell Annuity Payment asbestos exposure lawyers diagnosed with mesothelioma criminal defense attorneys florida structure settlements Data Recovery Raid NEUSON CAR INSURANCE IN SOUTH DAKOTA chicago hair laser removal Structures Annuity Settlement pharmacist jobs in chicago yahoo web hosting Car Insurance Quotes Colorado mesothelioma care DONATING USED CARS TO CHARITY accident attorneys orange county compare small business phone systems st louis mesothelioma attorney Dayton Freight Lines Hard drive Data Recovery Services Donate a Car in Maryland mesothelioma lawyer dallas miami personal injury attorney Online Criminal Justice Degree car accident lawyer in san diego Donate Cars Illinois compare life assurance Criminal Defense Attorneys Florida royalty free images stock Better Conference Calls cheap car insurance in virginia ASBESTOS LAWYERS Best Criminal Lawyers in Arizona Car Insurance Quotes Utah Life Insurance Co Lincoln Online Motor Insurance Quotes ONLINE MOTOR INSURANCE QUOTES Massage School Dallas Texas Online Colleges selling structured settlement mesothelioma drug Hard drive data recovery services Online Classes DONATE YOUR CAR SACRAMENTO paperport promotional code offshore accident lawyer Cheap domain registration hosting WORLD TRADE CENTER FOOTAGE Online colledges online motor insurance quotes personal injury attorney torrance best structured settlement companies Car Insurance Quotes MN WEBEX COSTS DALLAS MESOTHELIOMA ATTORNEYS car insurance quotes mn personal injury lawyer sarasota fl buyers of structured settlements PAPERPORT PROMOTIONAL CODE personal injury lawyer EMAIL BULK SERVICE Cheap Auto Insurance in VA Forensics Online Course injury lawyer houston tx Home Phone Internet Bundle purchase structured settlements Donating Used Cars to Charity bowne virtual data room Car insurance in South Dakota PHD on Counseling Education Psychic for free Royalty Free Images Stock world trade center footage Email Bulk Service Cheap Car Insurance for Ladies car insurance quotes pa CAR DONATE Register Free Domains donate your car for kids Mortgage Adviser Car Donate Virtual Data Rooms criminal defense federal lawyer lawyers accidents Auto Accident Attorney student loan consolidation program STRUCTURED ANNUITY SETTLEMENT personal accident attorney primary pulmonary hypertension Criminal lawyer Miami Motor Insurance Quotes