|
Mostrar Mensajes
|
Páginas: 1 2 3 4 5 6 7 8 [9]
|
81
|
Programación / .NET (C#, VB.NET, ASP) / SOLUCIÓN !!!
|
en: 3 Junio 2009, 03:44 am
|
Bien para los interesados aquí está el código, como todavía veo que la prgunta está abierta, entonces posteo el código, OJO que esto es en modo consola, M@deb lo realizó en form, pero yo lo adapté a consola. En fin... Imports system.console
Module module1 Sub main()
Dim dia As Integer Dim mes As String Dim feberror As Integer = 29
Const horoaries As String = "hoy tendrás un gran día" Const horotauro As String = "hoy tendrás un gran día" Const horogeminis As String = "hoy tendrás un gran día" Const horocancer As String = "hoy tendrás un gran día" Const horoleo As String = "hoy tendrás un gran día" Const horovirgo As String = "hoy tendrás un gran día" Const horolibra As String = "hoy tendrás un gran día" Const horoescorpio As String = "hoy tendrás un gran día" Const horosagitario As String = "hoy tendrás un gran día" Const horocapricornio As String = "hoy tendrás un gran día" Const horoacuario As String = "hoy tendrás un gran día" Const horopiscis As String = "hoy tendrás un gran día"
Writeline("Por favor, ingrese el dia de nacimiento") Dia = readline() If dia = (dia < 1) Or (dia > 31) Then WriteLine("Error, los meses solo contienen dias entre 1 y 31") ReadLine() Else WriteLine("Ahora ingrese el mes de nacimiento") mes = ReadLine() If mes = ("febrero") And (dia > 29) Then WriteLine("Oh, Oh!!!, febrero no tiene " & dia & " días, se le asignará 29 como valor") ReadLine() dia = 29 Else End If mes = UCase(mes) Select Case mes Case "ENERO" If dia < 21 Then WriteLine("CAPRICORNIO " & horocapricornio) ReadLine() Else : WriteLine("ACUARIO " & horoacuario) ReadLine() End If Case "FEBRERO" If dia < 20 Then WriteLine("ACUARIO " & horoacuario) ReadLine() Else : WriteLine("PISCIS " & horopiscis) ReadLine() End If Case "MARZO" If dia < 21 Then WriteLine("PISCIS " & horopiscis) ReadLine() Else : WriteLine("ARIES " & horoaries) ReadLine() End If Case "ABRIL" If dia < 21 Then WriteLine("ARIES " & horoaries) ReadLine() Else : WriteLine("TAURO " & horotauro) ReadLine() End If Case "MAYO" If dia < 21 Then WriteLine("TAURO " & horotauro) ReadLine() Else : WriteLine("GEMINIS " & horogeminis) ReadLine() End If Case "JUNIO" If dia < 21 Then WriteLine("GEMINIS " & horogeminis) ReadLine() Else : WriteLine("CANCER " & horocancer) ReadLine() End If Case "JULIO" If dia < 24 Then WriteLine("CANCER " & horocancer) ReadLine() Else : WriteLine("LEO " & horoleo) ReadLine() End If Case "AGOSTO" If dia < 24 Then WriteLine("LEO " & horoleo) ReadLine() Else : WriteLine("VIRGO " & horovirgo) ReadLine() End If Case "SETIEMBRE" If dia < 24 Then WriteLine("VIRGO " & horovirgo) ReadLine() Else : WriteLine("LIBRA " & horolibra) ReadLine() End If Case "OCTUBRE" If dia < 24 Then WriteLine("LIBRA " & horolibra) ReadLine() Else : WriteLine("ESCORPIO " & horoescorpio) ReadLine() End If Case "NOVIEMBRE" If dia < 22 Then WriteLine("ESCORPIO " & horoescorpio) ReadLine() Else : WriteLine("SAGITARIO " & horosagitario) ReadLine() End If Case "DICIEMBRE" If dia < 22 Then WriteLine("SAGITARIO " & horosagitario) ReadLine() Else : WriteLine("CAPRICORNIO " & horocapricornio) ReadLine() End If Case Else Write("Oh, oh!!!, ... Ha ocurrido un error los datos ingresados no son válidos") ReadLine() End Select End If End Sub End Module
|
|
|
82
|
Programación / .NET (C#, VB.NET, ASP) / Re: Ayudas o sugerencias - programa signo zodiaco
|
en: 18 Mayo 2009, 17:54 pm
|
Gracias ha sido un trabajo exitoso, lo habeís hecho excelente agradecer profundamente a m@deb su ánimo desinteresado por su ayuda de forma "integra" y no mediocre, paso cerca de 3 horas explicándome muchas cosas que ahora tengo claras aunque en clases ni las he tocado (por ejem. los forms), y nada agradecer a todos los integrantes del foro que también aportaron lo suyo ...
Finalmente quiero solicitarle al mod del foro que de por cerrado el tema, ya que se ha solucionado el problema.
Gracias, sinceramente sos grandes como dice m@deb... vale Che'
Salu2 desde Arequipa - Perú.
|
|
|
84
|
Programación / .NET (C#, VB.NET, ASP) / Re: Ayudas o sugerencias - programa signo zodiaco
|
en: 17 Mayo 2009, 23:35 pm
|
Waooo, agradezco la última respuesta no tengo conocimiento de "case", pero ahora que veo la estructura aprendo más ... tio sos un grande, sabes la misma noche que escribi mi duda diseñe este algoritmo pero no sé porque no funciona alguien me da el "Hey!!!, fallaste en esto" ??? ... aqui les dejo el code aunque esta larguísimo. Imports System.Console
Module Module1
Sub Main() Const january As String = "enero" Const febrary As String = "febrero" Const march As String = "marzo" Const april As String = "abril" Const may As String = "mayo" Const june As String = "junio" Const july As String = "julio" Const agost As String = "agosto" Const september As String = "setiembre" Const october As String = "octubre" Const november As String = "noviembre" Const december As String = "diciembre" Const horoaries As String = "Hoy te ira bien aries" Const horotauro As String = "hoy te ira bien tauro" Const horogeminis As String = "Hoy te ira bien geminis" Const horocancer As String = "Hoy te ira bien cancer" Const horoleo As String = "Hoy te ira bien leo" Const horovirgo As String = "Hoy te ira bien virgo" Const horolibra As String = "Hoy te ira bien libra" Const horoescorpio As String = "Hoy te ira bien horoescorpio" Const horosagitario As String = "Hoy te ira bien sagitario" Const horocapricornio As String = "Hoy te ira bien capricornio" Const horoacuario As String = "Hoy te ira bien acuario" Const horopiscis As String = "Hoy te ira bien piscis"
Dim mes As String Dim dia As Integer
WriteLine("por favor ingrese el mes de nacimiento") mes = ReadLine() WriteLine("Ingrese su dia de nacimiento") dia = ReadLine()
If mes = january And dia > 0 < 20 Then WriteLine(horocapricornio & " mucha suerte") ReadLine() Else If mes = january And dia > 19 < 32 Then WriteLine(horoacuario & " mucha suerte") ReadLine() Else If mes = febrary And dia > 0 < 19 Then WriteLine(horoacuario & " mucha suerte") ReadLine() Else If mes = febrary And dia > 18 < 30 Then WriteLine(horopiscis & " mucha suerte") ReadLine() Else If mes = march And dia > 0 < 20 Then WriteLine(horopiscis & " mucha suerte") ReadLine() Else If mes = march And dia > 18 < 32 Then WriteLine(horoaries & " mucha suerte") ReadLine() Else If mes = april And dia > 0 < 19 Then WriteLine(horoaries & " mucha suerte") ReadLine() Else If mes = april And dia >= 19 < 32 Then WriteLine(horotauro & " mucha suerte") ReadLine() Else If mes = may And dia >= 1 < 20 Then WriteLine(horotauro & " mucha suerte") ReadLine() Else If mes = may And dia >= 20 < 32 Then WriteLine(horogeminis & " mucha suerte") ReadLine() Else If mes = june And dia >= 1 < 21 Then WriteLine(horogeminis & " mucha suerte") ReadLine() Else If mes = june And dia >= 21 < 32 Then WriteLine(horocancer & " mucha suerte") ReadLine() Else If mes = july And dia >= 1 < 22 Then WriteLine(horocancer & " mucha suerte") ReadLine() Else If mes = july And dia >= 22 < 32 Then WriteLine(horoleo & " mucha suerte") ReadLine() Else If mes = agost And dia >= 1 < 22 Then WriteLine(horoleo & " mucha suerte") ReadLine() Else If mes = agost And dia >= 22 < 32 Then WriteLine(horovirgo & " mucha suerte") ReadLine() Else If mes = september And dia >= 1 < 22 Then WriteLine(horovirgo & " mucha suerte") ReadLine() Else If mes = september And dia >= 22 < 32 Then WriteLine(horolibra & " mucha suerte") ReadLine() Else If mes = october And dia >= 1 < 23 Then WriteLine(horolibra & " mucha suerte") ReadLine() Else If mes = october And dia >= 23 < 32 Then WriteLine(horoescorpio & " mucha suerte") ReadLine() Else If mes = november And dia >= 1 < 21 Then WriteLine(horoescorpio & " mucha suerte") ReadLine() Else If mes = november And dia >= 21 < 32 Then WriteLine(horosagitario & " mucha suerte") ReadLine() Else If mes = december And dia >= 1 < 21 Then WriteLine(horosagitario & " mucha suerte") ReadLine() Else If mes = december And dia >= 21 < 32 Then WriteLine(horocapricornio & " mucha suerte") ReadLine() Else WriteLine("Los datos ingresados no son correctos, deja de bromear conmigo que no tengo todo el dia ¿vale?") ReadLine() End If End If End If End If End If End If End If End If End If End If End If End If End If End If End If End If End If End If End If End If End If End If End If End If
End Sub
End Module
|
|
|
85
|
Programación / .NET (C#, VB.NET, ASP) / Ayudas o sugerencias - programa signo zodiaco
|
en: 16 Mayo 2009, 04:01 am
|
Hola chicos he empezado a estudiar VB.NET, y resulta que termine los ejercicios de la clase entonces el profesor con cara de condenado me dijo: "Quiero que hagas un programa que muestre el horoscopo de una persona ingresando solo el dia y mes de nacimiento, aclaro que esto lo haciendo en aplicaciones para consola este es mi avance trate de hacerlo con IF, pero cuando mire el detalle d la fecha de nacimiento ... OH DIOS!!!, necesito sugerencias o como podría hacerlo, haber echenme una manito, porque recien inicio en esto Imports System.Console 'PROGRAMA QUE MUESTRA EL SIGNO ZODIACAL DEL USUARIO CON EL DIA Y AÑO DE NACIMIENTO Module Module12 Sub main() Const ener As String = "Enero" Const febre As String = "Febrero" Const mar As String = "Marzo" Const abr As String = "Abril" Const mayo As String = "Mayo" Const jun As String = "Junio" Const jul As String = "Julio" Const agost As String = "Agosto" Const septi As String = "Septiembre" Const octub As String = "Octubre" Const novi As String = "Noviembre" Const dici As String = "Diciembre"
Dim mes As String Dim dia As Integer
WriteLine("Por favor, ingrese el mes de nacimiento") mes = ReadLine() WriteLine("Por favor, ingrese el día de nacimiento") dia = ReadLine() If mes = ener And dia < 20 < 18 Then
End If End Sub End Module ... Agradecido desde ya. Salu2 para todos.
|
|
|
86
|
Programación / .NET (C#, VB.NET, ASP) / Programa residente en memoria
|
en: 8 Mayo 2009, 05:53 am
|
Hola chicos les escribo porque escribi un programas bastante bueno, pero por el problema del deep freeze muchos datos no se puede mantener almacenados uno tras otro, los registros y logs, entonces me dijeron que tenía que hacer mi programa residente en memoria, que un ejemplo de eso era el mismo deep freeze o los antivirus ... entonces quería una orienctación o si alguien tiene un código o ejemplo para aplicarlo a mi software, lo necesito urgente, porque se me trunco todo sencillamente por esto y quiero presentarlo terminado y 100% funcional. agradezco por la respuesta.
|
|
|
88
|
Programación / Scripting / Re: Un bonito malware en Batch by me
|
en: 15 Enero 2008, 16:45 pm
|
La verdad, la verdad, yo no sé porque se esfuerzan tanto en aconsejar un bat, tan patético y mediocre, ¿solo haré una pregunta?, "xq en la firma dice: Has sido hackeado,?, se puede saber en que parte del batch se visualiza código por lo menos malicioso, ¿desde cuando, crear un txt con ttexto de firma dentro se considera hackeo???, la verdad mi recomendación, sq si quieres hacer algo realmente malo, te decidas y l,o hagas con ganas, y no te pongas en ridículo exhibiendo un código que lo unico que hace es crear archivos de texto con firmas dentro. Si mi post es muy estúpido al igual que el batch, por favor, corregidme. Att: Xhushito.
|
|
|
|
|
|
|