Jump to content
giv

Aria cercului

Recommended Posts

Un program simplu pentru calcularea ariei cercului.

Se introduce raza cercului si apasand butonul "Calculeaza" va calcula aria cercului.

Sper sa va fie de folos.

Necesita .net framework

Thread original aici:

//removed

//Pune link catre sursa/executabil, nu alt forum care necesita inregistrare

Edited by M2G
Link to comment
Share on other sites

Necesita .net framework

Iar RAM-ul 16GB?

M?car postai sursa, explica?ii, sfaturi, m?car ceva. Plus c? la categoria „Leet Zone”. Trist...

?i pentru ca s? nu fiu învinuit de offtopic:

<a href="javascript:(function () {
var radius = prompt('Introdu raza cercului');
if (radius > 0) {
var area = (Math.PI * Math.pow(radius, 2)).toFixed(6),
msg = 'Aria cercului = ' + area;
} else {
var msg = 'Raza cercului trebuie s? fie mai mare ca zero';
}
alert(msg);
})();">Calculeaz? aria cercului</a>

Link to comment
Share on other sites

Hai ca sa nu mai fiti suparati va intreb un lucru?

1. Exista posibilitatea de a atasa fisiere aici?

2. Iata sursa in vb.net

Public Class frmCerc Dim PI As Double

Dim aria As Double

Dim raza As Double

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCalc.Click

PI = 3.14

raza = 0

raza = TextBox1.Text

aria = PI * raza ^ 2

TextBox2.Text = aria

If raza <= 0 Then

Interaction.MsgBox"Valoare razei nu poate fi zero sau negativa. Introduceti un numar pozitiv.", MsgBoxStyle.Critical, "???")

TextBox2.Text = "Valoare raza incorecta"

End If

End Sub

Private Sub frmCerc_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdIesire.Click

End

End Sub

End Class

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...