prime number
prime number
prime number
prime number
prime number
prime number prime number prime number prime number prime number prime number prime number prime number
prime number prime number
prime number
Go Back  Xtreme Visual Basic Talk > > > prime number


Reply
 
Thread Tools Display Modes
  #1  
Old 03-11-2015, 11:34 PM
najwan96 najwan96 is offline
Newcomer
 
Join Date: Mar 2015
Posts: 2
Unhappy prime number


Edit by moderator: Please don't reply to threads which are inactive for more than 30 days

Could u please help me to make a solution on this question. ive done mny ways as im new in VB. but it stil couldnt run.. HELP :'(

Write a program that receives start value and end value by using inputbox for each value, this must happen when your program’s form is loaded. After entering the values in inputboxes, your program must display all prime numbers between start value (inclusive) and end value (inclusive) in a listbox.
** just write program, you can do it by using any method

Last edited by Flyguy; 03-12-2015 at 04:05 AM.
Reply With Quote
  #2  
Old 03-12-2015, 04:05 AM
Flyguy's Avatar
Flyguyprime number Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,165
Default

We don't write code for you.

Show what you have done so far and at which point you got stuck, then we might me able to help you.
Reply With Quote
  #3  
Old 03-12-2015, 10:37 AM
najwan96 najwan96 is offline
Newcomer
 
Join Date: Mar 2015
Posts: 2
Default

sorry ive compiled that question. and now... the next question is...


Write a program for BMI calculator. User can input his/her height in inches or in meters. Similarly his/her weight in kg or pounds. Then “calculate my BMI” button will display the result in the textbox at bottom. All radiobuttons in the form must be implemented by functions or procedures. It means that if “In Meter” radiobutton is clicked then it must call function or procedure, same is for the rest of radiobuttons.

HEIGHT= radiobutton1 (In Meters) = radiobutton2 (In Inches)
WEIGHT= radiobutton3 (In Kg) = radiobutton4 (In Pounds)


AND this is what im done in coding for that question. but, i dont know how to coding the radiobuttons that will be choosed by the user using procedure and function. could u help me please. n teach me a little bit.. I really want to know how is it:-

Code:
Public Class Form1

    Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim result As Single

        result = addFunction(TextBox1.Text, TextBox2.Text)
        TextBox3.Text = Format(result, 0.0)



    End Sub


    Private Function addFunction(ByVal weight As Single, ByVal height As Single) As Single

        Dim bmi As Single

        bmi = (weight / (height * height))
        Return bmi


    End Function

    Private Sub add(ByVal weight As Single, ByVal height As Single)
        Dim bmi As Single

        bmi = (weight / (height * height))
        TextBox3.Text = Format(bmi, 0.0)




    End Sub

    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        Button1.Enabled = RadioButton1.Checked
    End Sub

    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        Button1.Enabled = RadioButton2.Checked

    End Sub

    Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
        Button1.Enabled = RadioButton3.Checked

    End Sub

    Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
        Button1.Enabled = RadioButton4.Checked

    End Sub
End Class

Last edited by Flyguy; 03-12-2015 at 11:09 AM. Reason: Added [code][/code] tags and moved to VB.NET section
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
prime number
prime number
prime number prime number
prime number
prime number
prime number prime number prime number prime number prime number prime number prime number
prime number
prime number
 
prime number
prime number
 
-->