SlideShare a Scribd company logo
1 of 8
Download to read offline
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ejercicio_1;
import java.util.Scanner;
/**
*
* @author user
*/
public class Ejercicio_1 {
/**
* @param args the command line arguments
*/
public static int dimension, c, multiplicacion=1;
public static Scanner scn = new Scanner(System.in);
public static void main(String[] args) {
// TODO code application logic here
System.out.println("ingrese la dimension del arreglo");
dimension = scn.nextInt();
int vec[] = new int[dimension];
for (c = 0; c <= (dimension - 1); c = c + 1) {
System.out.println("Ingrese los numeros solo del 1 al 9");
System.out.println("Numeros " + c);
vec[c] = scn.nextInt();
if (vec[c] >= 0 & vec[c] <= 9) {
} else {
System.out.println("fuera de rango solo numeros del 0 al 9");
}
}
for (c = 0; c <= dimension; c++) {
System.out.println(c + ": " + vec[c]);
multiplicacion = multiplicacion * vec[c];
System.out.println("Multiplicacion " + multiplicacion);
}
}
}
……………………………………………………
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ejercicio2;
import java.util.Scanner;
/**
*
* @author user
*/
public class Ejercicio2 {
/**
* @param args the command line arguments
*/
public static int dimension, co, posicion;
public static String nombre;
public static Scanner scn = new Scanner(System.in);
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Ingrese la Dimension del vector");
dimension = scn.nextInt();
String vec[] = new String[dimension];
System.out.println("Ingrese el nombre que desea buscar ");
nombre = scn.next();
for (co = 0; co <= (dimension - 1); co = co + 1) {
System.out.println("Ingrese el nombre " + co);
vec[co] = scn.next();
if (vec[co].equals(nombre)) {
posicion = co;
System.out.println("SI EXISTE");
System.out.println("Esta en la pocicion " + posicion);
} else {
System.out.println("NO EXISTE");
}
}
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ejercicio3;
import java.util.Scanner;
/**
*
* @author user
*/
public class Ejercicio3 {
/**
* @param args the command line arguments
*/
public static int co,co2,co3;
public static String aux,cadena;
public static Scanner scn=new Scanner(System.in);
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Ingrese la la palabra o el texto");
cadena=scn.next();
for(co=cadena.length()-1;co>=0;co=co-1){
aux=aux+cadena.charAt(co);
for(co2=0;co2<=aux.length()-1;co++){
if(aux.charAt(co2)==cadena.charAt(co2)){
co3++;
}
}
}
if(co3==cadena.length()){
System.out.println("Es un Palondrimo");
}else{
System.out.println("No es un Palondrimo");
}
}
}
__________________________________________
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ejercicio4;
import java.util.Scanner;
/**
*
* @author user
*/
public class Ejercicio4 {
/**
* @param args the command line arguments
*/
public static int co, dimension, aux, posicion;
public static Scanner scn = new Scanner(System.in);
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Ingrese la dimension del vector");
dimension = scn.nextInt();
int vec[] = new int[dimension];
for (co = 0; co <= (dimension - 1); co = co + 1) {
System.out.println("Ingrese los numeros");
System.out.println("numero " + co);
vec[co] = scn.nextInt();
aux = vec[co];
if (aux >= vec[co]) {
posicion = co;
}
}
System.out.println("El numero mayor es " + aux);
System.out.println("Y esta en la posicion " + posicion);
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ejercicio5;
import java.util.Scanner;
* @author user
*/
public class Ejercicio5 {
/**
* @param args the command line arguments
*/
public static int co, dimension, auxmayor, promedio, auxmenor, ac;
public static Scanner scn = new Scanner(System.in);
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Ingrese la dimension del vector");
dimension = scn.nextInt();
int vec[] = new int[dimension];
for (co = 0; co <= (dimension - 1); co = co + 1) {
System.out.println("Ingrese los numeros");
System.out.println("Numero" + co);
vec[co] = scn.nextInt();
auxmayor = vec[0];
if (auxmayor > vec[co]) {
auxmayor = vec[co];
}
auxmenor = vec[0];
if (auxmenor < vec[co]) {
auxmenor = vec[co];
}
ac = ac + vec[co];
}
promedio = ac / co;
System.out.println("El numero Menor es= " + auxmayor);
System.out.println("El numero Mayor es= " + auxmenor);
System.out.println("Suma= " + ac);
System.out.println("Promedio= " + promedio);
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ejercicio6;
/**
*
* @author user
*/
public class Ejercicio6 {
/**
* @param args the command line arguments
*/
public static int num=1,num2=1,num3=0,co=0;
public static void main(String[] args) {
// TODO code application logic here
int vec[]=new int [10];
for(co=1;co<=9;co=co+1){
num3=(num3-num)+(num2-2);
num=num;
num2=num3;
vec[co]=num3;
System.out.println(vec[co]);
}
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ejercicio8;
import java.util.Scanner;
/**
*
* @author user
*/
public class Ejercicio8 {
/**
* @param args the command line arguments
*/
public static int dimension,co,posicion;
public static Scanner scn=new Scanner(System.in);
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Ingrese la dimension del vector");
dimension=scn.nextInt();
int vec[]=new int [dimension];
for(co=0;co<=(dimension-1);co=co+1){
System.out.println("Ingrese los numeros");
System.out.println("numero"+co);
vec[co]=scn.nextInt();
if(vec[co]%2==0){
posicion=co;
System.out.println(vec[co]);
System.out.println(posicion);
}
}
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ejercicio9;
import java.util.Scanner;
/**
*
* @author user
*/
public class Ejercicio9 {
/**
* @param args the command line arguments
*/
public static int secuencia=1,co=0,secuencia2;
public static int vec[]=new int [20];
public static Scanner scn=new Scanner(System.in);
public static void main(String[] args) {
// TODO code application logic here
for(co=1;co<=20;co=co+1){
if(co%2!=0){
secuencia2=secuencia-4;
vec[co]=secuencia;
}
else if(co%2==0){
secuencia2=secuencia+5;
vec[co]=secuencia2;
}
System.out.println(vec[co]);
}
}
}

More Related Content

What's hot

Java practice programs for beginners
Java practice programs for beginnersJava practice programs for beginners
Java practice programs for beginnersishan0019
 
Advanced Java Practical File
Advanced Java Practical FileAdvanced Java Practical File
Advanced Java Practical FileSoumya Behera
 
Works Applications Test - Chinmay Chauhan
Works Applications Test - Chinmay ChauhanWorks Applications Test - Chinmay Chauhan
Works Applications Test - Chinmay ChauhanChinmay Chauhan
 
Use C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in GeckoUse C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in GeckoChih-Hsuan Kuo
 
Java programs - bubble sort, iterator, linked list, hash set, reverse string,...
Java programs - bubble sort, iterator, linked list, hash set, reverse string,...Java programs - bubble sort, iterator, linked list, hash set, reverse string,...
Java programs - bubble sort, iterator, linked list, hash set, reverse string,...Sunil Kumar Gunasekaran
 
Spock Testing Framework - The Next Generation
Spock Testing Framework - The Next GenerationSpock Testing Framework - The Next Generation
Spock Testing Framework - The Next GenerationBTI360
 
Introduction to Reactive Extensions (Rx)
Introduction to Reactive Extensions (Rx)Introduction to Reactive Extensions (Rx)
Introduction to Reactive Extensions (Rx)Tamir Dresher
 
Final JAVA Practical of BCA SEM-5.
Final JAVA Practical of BCA SEM-5.Final JAVA Practical of BCA SEM-5.
Final JAVA Practical of BCA SEM-5.Nishan Barot
 
Security Events correlation with ESPER
Security Events correlation with ESPERSecurity Events correlation with ESPER
Security Events correlation with ESPERNikolay Klendar
 
Java PRACTICAL file
Java PRACTICAL fileJava PRACTICAL file
Java PRACTICAL fileRACHIT_GUPTA
 
JVM Mechanics: Understanding the JIT's Tricks
JVM Mechanics: Understanding the JIT's TricksJVM Mechanics: Understanding the JIT's Tricks
JVM Mechanics: Understanding the JIT's TricksDoug Hawkins
 
Java Performance Puzzlers
Java Performance PuzzlersJava Performance Puzzlers
Java Performance PuzzlersDoug Hawkins
 
201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harianKhairunnisaPekanbaru
 
Java Practical File Diploma
Java Practical File DiplomaJava Practical File Diploma
Java Practical File Diplomamustkeem khan
 

What's hot (20)

Java practice programs for beginners
Java practice programs for beginnersJava practice programs for beginners
Java practice programs for beginners
 
Advanced Java Practical File
Advanced Java Practical FileAdvanced Java Practical File
Advanced Java Practical File
 
Works Applications Test - Chinmay Chauhan
Works Applications Test - Chinmay ChauhanWorks Applications Test - Chinmay Chauhan
Works Applications Test - Chinmay Chauhan
 
Use C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in GeckoUse C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in Gecko
 
Java programs - bubble sort, iterator, linked list, hash set, reverse string,...
Java programs - bubble sort, iterator, linked list, hash set, reverse string,...Java programs - bubble sort, iterator, linked list, hash set, reverse string,...
Java programs - bubble sort, iterator, linked list, hash set, reverse string,...
 
Thread
ThreadThread
Thread
 
Unit Testing with Foq
Unit Testing with FoqUnit Testing with Foq
Unit Testing with Foq
 
Spock Testing Framework - The Next Generation
Spock Testing Framework - The Next GenerationSpock Testing Framework - The Next Generation
Spock Testing Framework - The Next Generation
 
Tugas 2
Tugas 2Tugas 2
Tugas 2
 
Introduction to Reactive Extensions (Rx)
Introduction to Reactive Extensions (Rx)Introduction to Reactive Extensions (Rx)
Introduction to Reactive Extensions (Rx)
 
JVM Mechanics
JVM MechanicsJVM Mechanics
JVM Mechanics
 
Final JAVA Practical of BCA SEM-5.
Final JAVA Practical of BCA SEM-5.Final JAVA Practical of BCA SEM-5.
Final JAVA Practical of BCA SEM-5.
 
Security Events correlation with ESPER
Security Events correlation with ESPERSecurity Events correlation with ESPER
Security Events correlation with ESPER
 
Java PRACTICAL file
Java PRACTICAL fileJava PRACTICAL file
Java PRACTICAL file
 
Spock framework
Spock frameworkSpock framework
Spock framework
 
JVM Mechanics: Understanding the JIT's Tricks
JVM Mechanics: Understanding the JIT's TricksJVM Mechanics: Understanding the JIT's Tricks
JVM Mechanics: Understanding the JIT's Tricks
 
Java Performance Puzzlers
Java Performance PuzzlersJava Performance Puzzlers
Java Performance Puzzlers
 
201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian
 
Fia fabila
Fia fabilaFia fabila
Fia fabila
 
Java Practical File Diploma
Java Practical File DiplomaJava Practical File Diploma
Java Practical File Diploma
 

Viewers also liked

Relex foretagspresentation 11.4.2013 roger
Relex foretagspresentation 11.4.2013 rogerRelex foretagspresentation 11.4.2013 roger
Relex foretagspresentation 11.4.2013 rogerRoger Sittnikow
 
волшебный кот черемискина
волшебный кот черемискинаволшебный кот черемискина
волшебный кот черемискинаmorozovaeyu
 
Harry Daniels HJC Adviseurs
Harry Daniels HJC AdviseursHarry Daniels HJC Adviseurs
Harry Daniels HJC AdviseursTIENevents
 
Nghề Nhân Sự
Nghề Nhân SựNghề Nhân Sự
Nghề Nhân SựAnh Tran
 
Projet gerland escrime
Projet gerland escrimeProjet gerland escrime
Projet gerland escrimemerlin69
 
Lowprice Montana Porch Swing Finish Lacquered
Lowprice Montana Porch Swing Finish LacqueredLowprice Montana Porch Swing Finish Lacquered
Lowprice Montana Porch Swing Finish Lacqueredontime460
 

Viewers also liked (12)

Relex foretagspresentation 11.4.2013 roger
Relex foretagspresentation 11.4.2013 rogerRelex foretagspresentation 11.4.2013 roger
Relex foretagspresentation 11.4.2013 roger
 
волшебный кот черемискина
волшебный кот черемискинаволшебный кот черемискина
волшебный кот черемискина
 
Rocca
RoccaRocca
Rocca
 
Front
FrontFront
Front
 
Harry Daniels HJC Adviseurs
Harry Daniels HJC AdviseursHarry Daniels HJC Adviseurs
Harry Daniels HJC Adviseurs
 
Art styles 2
Art styles 2Art styles 2
Art styles 2
 
Nghề Nhân Sự
Nghề Nhân SựNghề Nhân Sự
Nghề Nhân Sự
 
QR Codes at STA
QR Codes at STAQR Codes at STA
QR Codes at STA
 
Bridges of valencia
Bridges of valenciaBridges of valencia
Bridges of valencia
 
Projet gerland escrime
Projet gerland escrimeProjet gerland escrime
Projet gerland escrime
 
International flow of funds
International flow of fundsInternational flow of funds
International flow of funds
 
Lowprice Montana Porch Swing Finish Lacquered
Lowprice Montana Porch Swing Finish LacqueredLowprice Montana Porch Swing Finish Lacquered
Lowprice Montana Porch Swing Finish Lacquered
 

Similar to Base de-datos (20)

Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Estructura secuencial -garcia
Estructura secuencial -garciaEstructura secuencial -garcia
Estructura secuencial -garcia
 
Trabajo
TrabajoTrabajo
Trabajo
 
Chapter i(introduction to java)
Chapter i(introduction to java)Chapter i(introduction to java)
Chapter i(introduction to java)
 
Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ Exams
 
Attributes & .NET components
Attributes & .NET componentsAttributes & .NET components
Attributes & .NET components
 
Java programming lab manual
Java programming lab manualJava programming lab manual
Java programming lab manual
 
Introduction to the Stat-JR software package
Introduction to the Stat-JR software packageIntroduction to the Stat-JR software package
Introduction to the Stat-JR software package
 
java-programming.pdf
java-programming.pdfjava-programming.pdf
java-programming.pdf
 
TechTalk - Dotnet
TechTalk - DotnetTechTalk - Dotnet
TechTalk - Dotnet
 
Custom faultpolicies
Custom faultpoliciesCustom faultpolicies
Custom faultpolicies
 
Custom faultpolicies
Custom faultpoliciesCustom faultpolicies
Custom faultpolicies
 
Custom faultpolicies
Custom faultpoliciesCustom faultpolicies
Custom faultpolicies
 
CP 04.pptx
CP 04.pptxCP 04.pptx
CP 04.pptx
 
c++ practical Digvajiya collage Rajnandgaon
c++ practical  Digvajiya collage Rajnandgaonc++ practical  Digvajiya collage Rajnandgaon
c++ practical Digvajiya collage Rajnandgaon
 
Java Unit 1 Project
Java Unit 1 ProjectJava Unit 1 Project
Java Unit 1 Project
 

Recently uploaded

ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 

Recently uploaded (20)

ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 

Base de-datos

  • 1. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ejercicio_1; import java.util.Scanner; /** * * @author user */ public class Ejercicio_1 { /** * @param args the command line arguments */ public static int dimension, c, multiplicacion=1; public static Scanner scn = new Scanner(System.in); public static void main(String[] args) { // TODO code application logic here System.out.println("ingrese la dimension del arreglo"); dimension = scn.nextInt(); int vec[] = new int[dimension]; for (c = 0; c <= (dimension - 1); c = c + 1) { System.out.println("Ingrese los numeros solo del 1 al 9"); System.out.println("Numeros " + c); vec[c] = scn.nextInt(); if (vec[c] >= 0 & vec[c] <= 9) { } else { System.out.println("fuera de rango solo numeros del 0 al 9"); } } for (c = 0; c <= dimension; c++) { System.out.println(c + ": " + vec[c]); multiplicacion = multiplicacion * vec[c]; System.out.println("Multiplicacion " + multiplicacion); } } } ……………………………………………………
  • 2. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ejercicio2; import java.util.Scanner; /** * * @author user */ public class Ejercicio2 { /** * @param args the command line arguments */ public static int dimension, co, posicion; public static String nombre; public static Scanner scn = new Scanner(System.in); public static void main(String[] args) { // TODO code application logic here System.out.println("Ingrese la Dimension del vector"); dimension = scn.nextInt(); String vec[] = new String[dimension]; System.out.println("Ingrese el nombre que desea buscar "); nombre = scn.next(); for (co = 0; co <= (dimension - 1); co = co + 1) { System.out.println("Ingrese el nombre " + co); vec[co] = scn.next(); if (vec[co].equals(nombre)) { posicion = co; System.out.println("SI EXISTE"); System.out.println("Esta en la pocicion " + posicion); } else { System.out.println("NO EXISTE"); } } } }
  • 3. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ejercicio3; import java.util.Scanner; /** * * @author user */ public class Ejercicio3 { /** * @param args the command line arguments */ public static int co,co2,co3; public static String aux,cadena; public static Scanner scn=new Scanner(System.in); public static void main(String[] args) { // TODO code application logic here System.out.println("Ingrese la la palabra o el texto"); cadena=scn.next(); for(co=cadena.length()-1;co>=0;co=co-1){ aux=aux+cadena.charAt(co); for(co2=0;co2<=aux.length()-1;co++){ if(aux.charAt(co2)==cadena.charAt(co2)){ co3++; } } } if(co3==cadena.length()){ System.out.println("Es un Palondrimo"); }else{ System.out.println("No es un Palondrimo"); } } } __________________________________________
  • 4. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ejercicio4; import java.util.Scanner; /** * * @author user */ public class Ejercicio4 { /** * @param args the command line arguments */ public static int co, dimension, aux, posicion; public static Scanner scn = new Scanner(System.in); public static void main(String[] args) { // TODO code application logic here System.out.println("Ingrese la dimension del vector"); dimension = scn.nextInt(); int vec[] = new int[dimension]; for (co = 0; co <= (dimension - 1); co = co + 1) { System.out.println("Ingrese los numeros"); System.out.println("numero " + co); vec[co] = scn.nextInt(); aux = vec[co]; if (aux >= vec[co]) { posicion = co; } } System.out.println("El numero mayor es " + aux); System.out.println("Y esta en la posicion " + posicion); } }
  • 5. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ejercicio5; import java.util.Scanner; * @author user */ public class Ejercicio5 { /** * @param args the command line arguments */ public static int co, dimension, auxmayor, promedio, auxmenor, ac; public static Scanner scn = new Scanner(System.in); public static void main(String[] args) { // TODO code application logic here System.out.println("Ingrese la dimension del vector"); dimension = scn.nextInt(); int vec[] = new int[dimension]; for (co = 0; co <= (dimension - 1); co = co + 1) { System.out.println("Ingrese los numeros"); System.out.println("Numero" + co); vec[co] = scn.nextInt(); auxmayor = vec[0]; if (auxmayor > vec[co]) { auxmayor = vec[co]; } auxmenor = vec[0]; if (auxmenor < vec[co]) { auxmenor = vec[co]; } ac = ac + vec[co]; } promedio = ac / co; System.out.println("El numero Menor es= " + auxmayor); System.out.println("El numero Mayor es= " + auxmenor); System.out.println("Suma= " + ac); System.out.println("Promedio= " + promedio); } }
  • 6. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ejercicio6; /** * * @author user */ public class Ejercicio6 { /** * @param args the command line arguments */ public static int num=1,num2=1,num3=0,co=0; public static void main(String[] args) { // TODO code application logic here int vec[]=new int [10]; for(co=1;co<=9;co=co+1){ num3=(num3-num)+(num2-2); num=num; num2=num3; vec[co]=num3; System.out.println(vec[co]); } } }
  • 7. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ejercicio8; import java.util.Scanner; /** * * @author user */ public class Ejercicio8 { /** * @param args the command line arguments */ public static int dimension,co,posicion; public static Scanner scn=new Scanner(System.in); public static void main(String[] args) { // TODO code application logic here System.out.println("Ingrese la dimension del vector"); dimension=scn.nextInt(); int vec[]=new int [dimension]; for(co=0;co<=(dimension-1);co=co+1){ System.out.println("Ingrese los numeros"); System.out.println("numero"+co); vec[co]=scn.nextInt(); if(vec[co]%2==0){ posicion=co; System.out.println(vec[co]); System.out.println(posicion); } } } }
  • 8. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ejercicio9; import java.util.Scanner; /** * * @author user */ public class Ejercicio9 { /** * @param args the command line arguments */ public static int secuencia=1,co=0,secuencia2; public static int vec[]=new int [20]; public static Scanner scn=new Scanner(System.in); public static void main(String[] args) { // TODO code application logic here for(co=1;co<=20;co=co+1){ if(co%2!=0){ secuencia2=secuencia-4; vec[co]=secuencia; } else if(co%2==0){ secuencia2=secuencia+5; vec[co]=secuencia2; } System.out.println(vec[co]); } } }