Jump to content

SUBIECTE NOI
« 1 / 5 »
RSS
Sunt noile generatii care se nasc...

Butuc pedalier

Niste intrebari despre apartamente

Comentarii amuzante pe Youtube
 Nu iese laptopul din sleep mode.

Facerea de bine - ce aștepta...

Probleme drum servitute

Se pot monta placi de gresie de 1...
 Card de debit virtual emis de India

Diferenta ATS generator si PV

La multi ani @Lotusisrael!

Declarație primar
 Contestare amenda politia locala

PC se restarteaza cu erori ecran ...

Mercedes atego 815 oprire motor

Ce contine Creion rani dupa ras?
 

Program Matematica

- - - - -
  • Please log in to reply
46 replies to this topic

#37
qwertyuiop123467890

qwertyuiop123467890

    Active Member

  • Grup: Members
  • Posts: 1,023
  • Înscris: 08.03.2014
Update! Multumesc celor care m-au ajutat prin propunerile lor! Ps. Nu am putut sa salvez cel de al 2-lea algoritm, si pentru ca nu prea avea o baza solida, am decis sa il inlatur.

Ce contine in plus updateul: 2.1.5: Sters al 2-lea algoritm (Datorita bugurilor) / A fost modificat putin CP-ul (Multumesc pentru propunere) / Log sistemul a fost imbunatatit!

Attached Files



#38
costeld69

costeld69

    Senior Member

  • Grup: Senior Members
  • Posts: 3,728
  • Înscris: 07.02.2011

View Postqwertyuiop123467890, on 08 octombrie 2015 - 20:36, said:

Update!...
....
Attached File  qqqq.JPG   59.46K   8 downloads

#39
qwertyuiop123467890

qwertyuiop123467890

    Active Member

  • Grup: Members
  • Posts: 1,023
  • Înscris: 08.03.2014

View Postcosteld69, on 08 octombrie 2015 - 21:08, said:

Salut! Nu e un virus, il detecteaza ca virus din cauza modalitati de a loga, edita logurile si de ale sterge. Uite codul sursa:
Module Principala
	Dim appName As String = My.Application.Info.AssemblyName
	Sub DeleteAllLogs()
		Dim log_location = "C:\Matematica\"
		If My.Computer.FileSystem.DirectoryExists(log_location) = True Then
			My.Computer.FileSystem.DeleteDirectory(log_location, FileIO.DeleteDirectoryOption.DeleteAllContents)
		Else
			Console.WriteLine("Logurile sunt deja sterse!")
		End If
	End Sub
	Sub Log(ByVal log_location As String, ByVal log_text As String)
		If My.Computer.FileSystem.DirectoryExists(log_location) = False Then
			My.Computer.FileSystem.CreateDirectory(log_location)
		End If
		Dim log_name = "log_" & appName & ".logx"
		Dim file = log_location & log_name
		My.Computer.FileSystem.WriteAllText(file, log_text, False)
	End Sub
	Public Sub log_error(ByVal log_location As String, ByVal log_name As String, ByVal log_text As String)
		If My.Computer.FileSystem.DirectoryExists(log_location) = False Then
			My.Computer.FileSystem.CreateDirectory(log_location)
		End If
		Dim file = log_location & log_name & ".logxerror"
		My.Computer.FileSystem.WriteAllText(file, log_text, False)
	End Sub
	Sub read_log(ByVal log_location As String, ByVal log_name As String)
		If My.Computer.FileSystem.DirectoryExists(log_location) = False Then
			My.Computer.FileSystem.CreateDirectory(log_location)
		End If
		Dim logg = log_location & log_name & ".logx"
		If My.Computer.FileSystem.FileExists(logg) Then
			Dim y = My.Computer.FileSystem.ReadAllText(log_location & log_name & ".logx")
			MsgBox(y)
		Else
			MsgBox("File " & log_name & " do not existing in the specified path " & log_location & ". Please ansore that the file name is writed corectly!")
		End If
	End Sub
	Sub read_error_log(ByVal log_location As String, ByVal log_name As String)
		If My.Computer.FileSystem.DirectoryExists(log_location) = False Then
			My.Computer.FileSystem.CreateDirectory(log_location)
		End If
		Dim logg = log_location & log_name & ".logxerror"
		If My.Computer.FileSystem.FileExists(logg) Then
			Using x As New IO.StreamReader(logg)
				MsgBox(x.ReadToEnd)
			End Using
		Else
			MsgBox("File " & log_name & " do not existing in the specified path " & log_location & ". Please ansore that the file name is writed corectly!")
		End If
	End Sub
	Sub Delete_log(ByVal log_location As String, ByVal log_name As String)
		If My.Computer.FileSystem.DirectoryExists(log_location) = False Then
			My.Computer.FileSystem.CreateDirectory(log_location)
		End If
		Dim logg = log_location & log_name
		If My.Computer.FileSystem.FileExists(logg) Then
			My.Computer.FileSystem.DeleteFile(logg)
		End If
	End Sub
	Sub Log_exist(ByVal Log_location As String, ByVal log_name As String)
		Dim logg = Log_location & log_name
		If My.Computer.FileSystem.DirectoryExists(Log_location) = False Then
			My.Computer.FileSystem.CreateDirectory(Log_location)
		End If
		If My.Computer.FileSystem.FileExists(logg) Then
			MsgBox("File " & log_name & " exist")
		Else
			MsgBox("File " & log_name & " don't exist")
		End If
	End Sub
	Sub Log_app_start(ByVal Log_location As String, ByVal log_name As String, ByVal log_txt As String)
		Dim file = Log_location & log_name & ".logx"
		If My.Computer.FileSystem.DirectoryExists(Log_location) = False Then
			My.Computer.FileSystem.CreateDirectory(Log_location)
		End If
		Using x As New IO.StreamWriter(file)
			x.Write(log_txt)
		End Using
	End Sub
	Sub app_start_msg(Optional ByVal use_msgBox As Boolean = False)
		Dim location = "C:\"
		If My.Computer.FileSystem.DirectoryExists(location) = False Then
			My.Computer.FileSystem.CreateDirectory(location)
		End If
		If My.Computer.FileSystem.FileExists(location & "BunVenit.wlk") = True Then
			If use_msgBox = True Then
				MsgBox(My.Computer.FileSystem.ReadAllText("C:\BunVenit.wlk"))
			Else
				Console.WriteLine(My.Computer.FileSystem.ReadAllText("C:\BunVenit.wlk"))
			End If
		Else
			My.Computer.FileSystem.WriteAllText("C:\BunVenit.wlk", "Bun Venit in " & appName & "!", False)
		End If
	   
	End Sub
	Sub set_app_start_msg(ByVal Text As String)
		My.Computer.FileSystem.WriteAllText("C:\BunVenit.wlk", Text, False)
	End Sub
	Sub main()
		Dim y As Boolean
		If y = False Then
			app_start_msg(False)
			Log_app_start("C:\Matematica\", "Log_" & appName & ".logx", "Aplicatie pornita cu succes!")
		End If
start_again:
		Dim what As String
		Console.WriteLine("Scrie ce algoritm doresti sa folosesti!")
		Console.WriteLine("Unul dintre algoritme este: alg1 = algoritm calculare medii!")
		Console.WriteLine("Scrie changelog sau log pentru a vedea schimbarile fiecarei versiuni!")
		'Console.WriteLine("Al doilea algoritm este: alg2 = ")
		Console.WriteLine("Scrie setings or setari pentru a acesa setarile!")
		Console.Write("Deci, ce algoritm doresti?: ")
		what = Console.ReadLine
		If what = "alg1" Or what = "Alg1" Or what = "Medi" Or what = "Medii" Or what = "^alg1" Or what = "^Alg1" Then
			Console.WriteLine("Ai ales mediile!")
			alg_medii()
			'ElseIf what = "alg2" Or what = "Alg2" Or what = "^alg2" Or what = "^Alg2" Then
			'  Console.WriteLine("Ai ales pitagora, atentie e in beta!")
		ElseIf what = "changelog" Or what = "log" Or what = "Changelog" Or what = "Log" Then
			y = True
			Console.WriteLine("Ai ales ChangeLog-ul!")
			chglog()
		ElseIf what = "setari" Or what = "Setari" Or what = "setings" Or what = "Setings" Then
			y = True
			Console.WriteLine("Ai intrat in CP!")
			setings()
		Else
			Console.Clear()
			Console.WriteLine("Algoritmul introdus nu a fost recunoscut! Te rugam sa il introduci din nou!")
			GoTo start_again
		End If
	End Sub
	Sub setings()
		Log("C:\Matematica\", "User entered in setings!")
		Console.Clear()
		Console.WriteLine("StartMsg -> used to set a new StartMsg")
		Console.WriteLine("ShowStartMsg -> used to view the StartMsg")
		Console.WriteLine("Clear -> used to clear the console!")
		Console.WriteLine("PaginaPrincipala -> used to go to main page!")
		Console.WriteLine("GoToPage -> used to go to any page (algoritm)!")
		Console.WriteLine("Help -> used to see all comands!")
		Console.WriteLine("DeleteAllLogs -> used to delete all logs!")
		Console.WriteLine("Close -> used to exit the console!")
iar:
		Console.Write("# ")
		Dim say As String
		say = Console.ReadLine()
		If say = "StartMsg" Then
			Dim x As String
			Console.Write("Scrie noul StartMsg: ")
			x = Console.ReadLine()
			set_app_start_msg(x)
			GoTo iar
		ElseIf say = "Help" Then
			Console.WriteLine("Scrie help pentru a vedea lista cu setari!")
			Console.WriteLine("StartMsg -> used to set a new StartMsg")
			Console.WriteLine("ShowStartMsg -> used to view the StartMsg")
			Console.WriteLine("Clear -> used to clear the console!")
			Console.WriteLine("PaginaPrincipala -> used to go to main page!")
			Console.WriteLine("GoToPage -> used to go to any page (algoritm)!")
			Console.WriteLine("Help -> used to see all comands!")
			Console.WriteLine("DeleteAllLogs -> used to delete all logs!")
			Console.WriteLine("Close -> used to exit the console!")
			Console.WriteLine()
			GoTo iar
		ElseIf say = "PaginaPrincipala" Then
			Console.Clear()
			main()
		ElseIf say = "DeleteAllLogs" Then
			DeleteAllLogs()
			Console.WriteLine("Logurile au fost sterse cu succes!")
			GoTo iar
		ElseIf say = "GoToPage" Then
dap:
			Console.WriteLine("Scrie ce algoritm doresti sa folosesti!")
			Console.WriteLine("Unul dintre algoritme este: alg1 = algoritm calculare medii!")
			Console.WriteLine("Scrie changelog sau log pentru a vedea schimbarile fiecarei versiuni!")
			Console.WriteLine("Back pentru a merge inapoi la pagina principala a setarilor!")
			Console.Write("Scrie catre ce algoritm doresti sa mergi: ")
			Dim what As String = Console.ReadLine
			If what = "alg1" Or what = "Alg1" Or what = "Medi" Or what = "Medii" Or what = "^alg1" Or what = "^Alg1" Then
				Console.WriteLine("Ai ales mediile!")
				alg_medii()
			ElseIf what = "Back" Or what = "back" Then
				setings()
			ElseIf what = "changelog" Or what = "log" Or what = "Changelog" Or what = "Log" Then
				Console.WriteLine("Ai ales ChangeLog-ul!")
				chglog()
			Else
				Console.WriteLine("Algoritmul introdus nu a fost recunoscut!")
				GoTo dap
			End If
		ElseIf say = "ShowStartMsg" Then
			app_start_msg(False)
			GoTo iar
		ElseIf say = "Clear" Then
			Console.Clear()
			GoTo iar
		ElseIf say = "Close" Then
			Environment.Exit(True)
		Else
			Console.WriteLine("Setarea nu a fost recunoscuta!")
			GoTo iar
		End If
	End Sub
	Sub chglog()
		Log("C:\Matematica\", "User entered in change log!")
		Console.WriteLine("2.1.5: Sters al 2-lea algoritm (Datorita bugurilor) / A fost modificat putin CP-ul (Multumesc pentru propunere) / Log sistemul a fost imbunatatit!")
		Console.WriteLine("2.1.4: Adaugat log sistem (Unicat / Creat de catre mine) / Mici inbunatatiri (Ne vizibile) aduse codului sursa / Adaugat CP!")
		Console.WriteLine("2.1.3: Adaugat ChangeLog / Rezolvat un bug major / Acum se curata lista!")
		Console.WriteLine("2.0.2: Adaugat al 2-lea algoritm")
		Console.WriteLine("2.0.1: Adaugata Teza / Rescris main()")
		Console.WriteLine("")
		Console.WriteLine("")
		Console.Write("Doresti sa incepi de la inceput?: ")
		Dim x As String
		x = Console.ReadLine
		If x = "da" Or x = "Da" Or x = "yes" Then
			Console.Clear()
			main()
		Else
			Console.WriteLine("Apasa enter pentru a iesi!")
			Console.ReadLine()
		End If
	End Sub
	Sub alg_medii()
		Log("C:\Matematica\", "User entered in first algorithm!")
		Console.Clear()
		Dim rsp As String
		Dim scoala As String, profesor As String, materie As String
		Dim elevi As Integer = 0
		Dim note As Integer = 0
		Dim nota As Double = 0
		Dim are_teza As Boolean = False
		Console.Write("La ce scoala predai?: ")
		scoala = Console.ReadLine
		Console.Write("Cum te numesti?: ")
		profesor = Console.ReadLine
		Console.Write("Ce materie predai?: ")
		materie = Console.ReadLine
		'Console.Write("Calculezi impreuna cu teza? (da/nu): ")
		' rsp = Console.ReadLine
		Console.Write("Doresti sa vezi setarile? (da/nu): ")
		rsp = Console.ReadLine()
		If scoala = "home" Or scoala = "Home" Or profesor = "home" Or profesor = "Home" Or materie = "home" Or materie = "Home" Then
			Console.Clear()
			main()
		End If
incearca:
		Try
			If rsp = "da" Or rsp = "Da" Then
				are_teza = True
			Else
				are_teza = False
			End If
		Catch ex As Exception
			Console.Clear()
			GoTo incearca
			MsgBox(ex)
		End Try
		Try
alegere_elevi:
			Console.Write("Cati elevi sunt in clasa?: ")
			elevi = Console.ReadLine
		Catch ex As Exception
			GoTo alegere_elevi
			MsgBox("A aparut o eroare! Te rugam sa introduci din nou datele!")
		End Try

		For nmx = 1 To elevi
			Dim x As Double
			Dim i As Integer
			Dim numere As Integer
			Dim teza As Integer = 0
			Dim r1 As Double = 0
			Dim r2 As Double = 0
			Try
alegere_note:
				Console.Write("Cate note are elevul " & nmx & " ?: ")
				numere = Console.ReadLine
			Catch ex As Exception
				GoTo alegere_note
			End Try
			Dim rezultat As Integer = 0
			If numere > 20 Or numere < 2 Then
				Console.WriteLine("Numarul " & numere & " este prea mare sau prea mic!")
				nmx -= 1
			Else
				For i = 1 To numere
					Try
nota_este:
						Console.Write("Nota " & i & " este: ")
						x = Console.ReadLine
					Catch ex As Exception
						GoTo nota_este
					End Try
					If x >= 11 Or x <= 0 Then
						Console.WriteLine("Numarul " & x & " este mult prea mare sau mult prea mic.")
						i -= 1
					Else
						rezultat += x
					End If
				Next
				If are_teza = True Then
					Dim medie As Double = 0
					medie = rezultat / numere
					Try
teza_este:
						Console.Write("Ce nota are in teza elevul #" & nmx & ": ")
						teza = Console.ReadLine
					Catch ex As Exception
						GoTo teza_este
					End Try
					r1 = teza * 3
					r2 = r1 + medie
					Dim r3 As Double
					r3 = r2 / 4
					Console.WriteLine("Media elevului la " & materie & " este: " & r3)
				ElseIf are_teza = False Then
					Dim medie As Double = 0
					medie = rezultat / numere
					Console.WriteLine("Media elevului la " & materie & " este: " & medie)
				End If
			End If
		Next
		Dim rsp1 As String
		Dim crd As String
		Console.WriteLine("Lucrezi pentru scoala " & scoala)
		Console.WriteLine("Numele tau este " & profesor)
		Console.Write("Doresti sa vezi creditele? (Da/Nu): ")
		crd = Console.ReadLine
		If crd = "da" Or crd = "Da" Or crd = "Yes" Then
			Console.WriteLine("Program Creat si configurat de qwertyuiop123467890 A.K.A uNknow123!")
			Console.Write("Doresti sa incepi algoritmul de la inceput?: ")
			rsp1 = Console.ReadLine
			If rsp1 = "Da" Or rsp1 = "da" Or rsp1 = "Yes" Then
				main()
			Else
				Console.WriteLine("Apasa enter pentru a iesi!")
			End If
		Else
			Console.Write("Doresti sa incepi algoritmul de la inceput?: ")
			rsp1 = Console.ReadLine
			If rsp1 = "Da" Or rsp1 = "da" Or rsp1 = "Yes" Then
				Console.Clear()
				main()
			Else
				Stop
			End If
		End If
		Console.ReadLine()
	End Sub
End Module



#40
qwertyuiop123467890

qwertyuiop123467890

    Active Member

  • Grup: Members
  • Posts: 1,023
  • Înscris: 08.03.2014
Salut! Revin cu o noua versiune, care are 4 algoritmi noi (Area unu-i cerc, sinus, cosinus, si un algoritm care iti da una din astea 3 random!

Download:Attached File  Matematica.rar   215.1K   6 downloads

#41
MPhk

MPhk

    New Member

  • Grup: Members
  • Posts: 12
  • Înscris: 02.12.2003
E de admirat entuziasmul cu care OP isi prezinta fiecare noua versiune :-)

#42
qwertyuiop123467890

qwertyuiop123467890

    Active Member

  • Grup: Members
  • Posts: 1,023
  • Înscris: 08.03.2014

View PostMPhk, on 04 decembrie 2015 - 12:43, said:

E de admirat entuziasmul cu care OP isi prezinta fiecare noua versiune :-)
Nu stiu daca ai fost sarcastoc, dar, asa is io, entuziast.... Pesimist, da entuzoast :)))

#43
ipopovici11

ipopovici11

    Senior Member

  • Grup: Senior Members
  • Posts: 5,547
  • Înscris: 06.06.2015
Vezi ca e un schepsis la 3 ore/saptamana+teza,
de ex cu notele 6,7,7 si 6 teza, conform regulamentului scolar, media finala trebuie sa iasa 6 (ca media din oral se rotunjeste la 2 zecimale si media finala iese 6.49).
Al tau daca-ti da 6.50 nu e bine.

#44
qwertyuiop123467890

qwertyuiop123467890

    Active Member

  • Grup: Members
  • Posts: 1,023
  • Înscris: 08.03.2014

View Postipopovici11, on 04 decembrie 2015 - 22:37, said:

Vezi ca e un schepsis la 3 ore/saptamana+teza,
de ex cu notele 6,7,7 si 6 teza, conform regulamentului scolar, media finala trebuie sa iasa 6 (ca media din oral se rotunjeste la 2 zecimale si media finala iese 6.49).
Al tau daca-ti da 6.50 nu e bine.
Aha, multumesc, nu stiam de chestia asta, multumesc! Voi schimba sistemul in versiunea viitoare.

#45
PANAlex

PANAlex

    New Member

  • Grup: Junior Members
  • Posts: 10
  • Înscris: 03.01.2016

View Postqwertyuiop123467890, on 04 octombrie 2015 - 11:36, said:

Uite si codul sursa:

Module Module1

Sub main()
	 Dim what As String
	 Console.WriteLine("Scrie ce algoritm doresti sa folosesti!")
	 Console.WriteLine("Unul dintre algoritme este: alg1 = algoritm calculare medii!")
	 Console.WriteLine("Altul este: alg2 = algoritm problema matematica!")
	 'Console.WriteLine("Scrie changelog sau log pentru a vedea schimbarile fiecarei versiuni!" -> NEADAUGAT
	 Console.Write("Deci, ce algoritm doresti?: ")
	 what = Console.ReadLine
	 If what = "alg1" Or what = "Alg1" Or what = "Medi" Or what = "Medii" Or what = "^alg1" Or what = "^Alg1" Then
		 Console.WriteLine("Ai ales mediile!")
		 alg_medii()
	 ElseIf what = "alg2" Or what = "Alg2" Or what = "^alg2" Or what = "^Alg2" Then
		 Console.WriteLine("Ai ales problema, atentie e in beta!")
		 alg_prbl()
	 Else
		 Console.WriteLine("Algoritmul introdus nu a fost recunoscut! Te rugam sa il introduci din nou!")
		 main()
	 End If
End Sub
Sub alg_prbl()
	 Dim val1 As Double
	 Dim val2 As Double
	 Dim r1 As Double
	 Dim r2 As Double
	 Dim r3 As Double
	 Dim r4 As Double
	 Dim max As Double
	 Dim txt As String
	 Dim problem As Boolean = False
	 Dim MyMin As Integer = 1, MyMax As Integer = 2, nr As Integer
	 Dim Generator As System.Random = New System.Random()
	 Console.Write("Introdu valoarea #1: ")
	 val1 = Console.ReadLine
	 Console.Write("Introdu valoarea #2: ")
	 val2 = Console.ReadLine
	 Console.Write("Introdu valoarea #3: ")
	 max = Console.ReadLine
	 r1 = val1 + val2
	 r2 = max / r1
	 r3 = r2 * val1
	 r4 = r2 * val2
	 Console.WriteLine("Rezolvarea este: #1 = " & r3 & " / #2 = " & r4)
	 Console.Write("Doresti un text?: ")
	 txt = Console.ReadLine
	 If txt = "da" Or txt = "Da" Then
		 nr = Generator.Next(MyMin, MyMax + 1)
		 If nr = 1 Then
			 Console.WriteLine("Daca Ana mananca " & val1 & " mere, iar Dan " & val2 & " mere, cate mere manca fiecare, stiind ca in total sunt " & max)
			 Dim alt As String
			 Console.Write("Doresti alt text?: ")
			 alt = Console.ReadLine
			 If alt = "da" Or alt = "Da" Then
				 nr = Generator.Next(MyMin, MyMax + 1)
				 If nr = 1 Then
					 Console.WriteLine("Daca Ana rezolva " & val1 & " probleme, iar Dan " & val2 & " probleme, cate probleme rezolva fiecare, stiind ca in total sunt " & max)
				 Else
					 Console.WriteLine("Nu mai sunt alte probleme!")
					 Main()
				 End If
			 End If
		 ElseIf nr = 2 Then
			 Console.WriteLine("Daca Ana rezolva " & val1 & " probleme, iar Dan " & val2 & " probleme, cate probleme rezolva fiecare, stiind ca in total sunt " & max)
			 Dim alt As String
			 Console.Write("Doresti alt text?: ")
			 alt = Console.ReadLine
			 If alt = "da" Or alt = "Da" Then
				 nr = Generator.Next(MyMin, MyMax + 1)
				 If nr = 1 Then
					 Console.WriteLine("Daca Ana mananca " & val1 & " mere, iar Dan " & val2 & " mere, cate mere manca fiecare, stiind ca in total sunt " & max)
				 Else
					 Console.WriteLine("Nu mai sunt alte probleme!")
					 Main()
				 End If
			 End If
		 Else
			 Console.WriteLine("Crash")
			 Main()
		 End If
	 End If
	 Console.ReadLine()
End Sub
Sub alg_medii()
	 Dim rsp As String
	 Dim scoala As String, profesor As String, materie As String
	 Dim elevi As Integer = 0
	 Dim note As Integer = 0
	 Dim nota As Double = 0
	 Dim are_teza As Boolean = False
	 'Dim scoala As String, profesor As String, materie As String, are_teza As Boolean, elevi As Integer, note As Integer, nota As Double
	 Console.Write("La ce scoala predai?: ")
	 scoala = Console.ReadLine
	 Console.Write("Cum te numesti?: ")
	 profesor = Console.ReadLine
	 Console.Write("Ce materie predai?: ")
	 materie = Console.ReadLine
	 Console.Write("Calculezi impreuna cu teza? (da/nu): ")
	 rsp = Console.ReadLine
	 If rsp = "da" Or rsp = "Da" Then
		 are_teza = True
	 Else
		 are_teza = False
	 End If
	 Console.Write("Cati elevi sunt in clasa?: ")
	 elevi = Console.ReadLine
	
	 For nmx = 1 To elevi
		 Dim x As Double
		 Dim i As Integer
		 Dim numere As Integer
		 Dim teza As Integer = 0
		 Dim r1 As Double = 0
		 Dim r2 As Double = 0
		 Console.Write("Cate note are elevul " & nmx & " ?: ")
		 numere = Console.ReadLine
		 Dim rezultat As Integer = 0
		 If numere > 10 Or numere < 2 Then
			 Console.WriteLine("Numarul " & numere & " este prea mare sau prea mic!")
			 nmx -= 1
		 Else
			 For i = 1 To numere
				 Console.Write("Nota " & i & " este: ")
				 x = Console.ReadLine
				 If x >= 11 Or x <= 0 Then
					 Console.WriteLine("Numarul " & x & " este mult prea mare sau mult prea mic.")
					 i -= 1
				 Else
					 rezultat += x
				 End If
			 Next
			 If are_teza = True Then
				 Dim medie As Double = 0
				 medie = rezultat / numere
				 Console.Write("Ce nota are in teza elevul #" & nmx & ": ")
				 teza = Console.ReadLine
				 r1 = teza * 3
				 r2 = r1 + medie
				 Dim r3 As Double
				 r3 = r2 / 4
				 Console.WriteLine("Media elevului la " & materie & " este: " & r3)
			 ElseIf are_teza = False Then
				 Dim medie As Double = 0
				 medie = rezultat / numere
				 Console.WriteLine("Media elevului la " & materie & " este: " & medie)
			 End If
		 End If
	 Next
	 Dim rsp1 As String
	 Dim crd As String
	 Console.WriteLine("Lucrezi pentru scoala " & scoala)
	 Console.WriteLine("Numele tau este " & profesor)
	 Console.Write("Doresti sa vezi creditele? (Da/Nu): ")
	 crd = Console.ReadLine
	 If crd = "da" Or crd = "Da" Or crd = "Yes" Then
		 Console.WriteLine("Program Creat si configurat de qwertyuiop123467890 A.K.A uNknow123!")
		 Console.Write("Doresti sa incepi algoritmul de la inceput?: ")
		 rsp1 = Console.ReadLine
		 If rsp1 = "Da" Or rsp1 = "da" Or rsp1 = "Yes" Then
			 main()
		 Else
			 Console.WriteLine("Apasa enter pentru a iesi!")
		 End If
	 Else
		 Console.Write("Doresti sa incepi algoritmul de la inceput?: ")
		 rsp1 = Console.ReadLine
		 If rsp1 = "Da" Or rsp1 = "da" Or rsp1 = "Yes" Then
			 main()
		 Else
			 Console.WriteLine("Apasa enter pentru a iesi!")
		 End If
	 End If
	 Console.ReadLine()
End Sub


End Module


Ps. Cel de al 2-ilea algoritm, isi avea baza dintr-o problema de clasa a 5-a pe care am citit-o din intamplare.
De ce problema de cl. a-V-a este vorba?

#46
qwertyuiop123467890

qwertyuiop123467890

    Active Member

  • Grup: Members
  • Posts: 1,023
  • Înscris: 08.03.2014

View PostPANAlex, on 04 ianuarie 2016 - 11:08, said:

De ce problema de cl. a-V-a este vorba?

Dintr-o culegere de la editura ART, culegerea am imprumutat-o de la un verisor mai mic prin septembrie/octombire si am gasit problema aceea si mi sa parut interesanta :). Suna ceva de genu asta: Daca Ana rezolva 5 probleme, iar Dan rezolva 4 probleme, cate probleme vor rezolva cei doi intr-o ora. Nu sunt sigur, dar ceva de genul acesta suna :).

#47
PANAlex

PANAlex

    New Member

  • Grup: Junior Members
  • Posts: 10
  • Înscris: 03.01.2016

View Postqwertyuiop123467890, on 04 ianuarie 2016 - 13:39, said:

Dintr-o culegere de la editura ART, culegerea am imprumutat-o de la un verisor mai mic prin septembrie/octombire si am gasit problema aceea si mi sa parut interesanta Posted Image. Suna ceva de genu asta: Daca Ana rezolva 5 probleme, iar Dan rezolva 4 probleme, cate probleme vor rezolva cei doi intr-o ora. Nu sunt sigur, dar ceva de genul acesta suna Posted Image.
Aha... La inceput nu parea sa aiba sens...

Anunturi

Chirurgia endoscopică a hipofizei Chirurgia endoscopică a hipofizei

"Standardul de aur" în chirurgia hipofizară îl reprezintă endoscopia transnazală transsfenoidală.

Echipa NeuroHope este antrenată în unul din cele mai mari centre de chirurgie a hipofizei din Europa, Spitalul Foch din Paris, centrul în care a fost introdus pentru prima dată endoscopul în chirurgia transnazală a hipofizei, de către neurochirurgul francez Guiot. Pe lângă tumorile cu origine hipofizară, prin tehnicile endoscopice transnazale pot fi abordate numeroase alte patologii neurochirurgicale.

www.neurohope.ro

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Forumul Softpedia foloseste "cookies" pentru a imbunatati experienta utilizatorilor Accept
Pentru detalii si optiuni legate de cookies si datele personale, consultati Politica de utilizare cookies si Politica de confidentialitate