Microsoft Visual Basic 2010(более ранние тоже прокатят)
Dim I As Single Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load I = Val(InputBox("Введите число")) If I >= 0 Then I = I - 50 Else I = I + 100 End If MsgBox(I) End Sub
Не указано, какая используется СУБД, ниже запросы подойдут для Postgresql: 1. select article.id from article where article.text like '%beta%' or '%4%' 2. select article.id from article where comments.text is NULL and article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id 3. select users.name from users where users.id=article.user_id and article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id 4. SELECT article.id, COUNT(comments.id) AS "CNT" from article, comments where article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id
Не указано, какая используется СУБД, ниже запросы подойдут для Postgresql: 1. select article.id from article where article.text like '%beta%' or '%4%' 2. select article.id from article where comments.text is NULL and article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id 3. select users.name from users where users.id=article.user_id and article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id 4. SELECT article.id, COUNT(comments.id) AS "CNT" from article, comments where article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id
Microsoft Visual Basic 2010(более ранние тоже прокатят)
Dim I As Single
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
I = Val(InputBox("Введите число"))
If I >= 0 Then
I = I - 50
Else
I = I + 100
End If
MsgBox(I)
End Sub
Просто на Basic
Dim I As Single
Input(I)
If I >= 0 Then
I = I - 50
Else
I = I + 100
End If
Print I
End