FRESHERSHOME![]() |
This is a discussion on i want a code in Visual Basic that will give the prime triangle as an output.? within the Visual Basic forums, part of the Languages category; The output should be as follows 2 2 3 2 3 5 2 3 5 7 2 3 5 7 ...
| |||||||
| Notices |
| Visual Basic Visual Basic Discussion Forum, Visual Basic related configuration, help, tips, source code |
![]() |
| | Thread Tools | Display Modes |
|
#1
| |||
| |||
| The output should be as follows 2 2 3 2 3 5 2 3 5 7 2 3 5 7 11 2 3 5 7 11 13 The user inputs the number of rows he wants and that many rows of prime numbers as shown above should be printed.
__________________ Powered by Yahoo! |
|
#2
| |||
| |||
| Dim arr(10) As Integer For i = 1 To 10 arr(i) = i Next For i = 1 To 5 Str1 = "" For j = 1 To i Str1 = Str1 & arr(i) & Space(2) Next j Print Str1 Next The o/p is like this 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 This is an Example to print such type of Triangle. Change the code to storee Prime numbes into array. Other Things works automatically.
__________________ Powered by Yahoo! |
![]() |
| Tags |
| prime triangle code, visual basic code |
| Thread Tools | |
| Display Modes | |
|
|
Sitemap
Jobs by Location: Advertising and Marketing Jobs - IT Software Jobs - Walk-in Jobs - BPO Jobs - Government Jobs - Sales / BD Jobs - Tele Communication Jobs App Programming - Network Admin
Jobs By Location: Jobs in Bangalore - Jobs In India - Jobs in Delhi - Jobs in Hyderabad - Jobs in Kochi - Jobs in Mumbai - Jobs in Trivandrum - Jobs in pune - Jobs in Jonida - Jobs in Chennai - Jobs in Coimbator
Jobs Type: Full Time Jobs - Part Time Jobs
Latest Jobs - Accounting Jobs - Engineering Jobs - IT Jobs - Walkins - How to Face Interview - HR Round Tips - Career Info - Guide For Freshers - Apply for Jobs - Future Studies - Jobs Forums - Freshers IT Software Salary Details