Write a VB program in to find number is Armstrong or not?
Private Sub Check_Click()
Dim d As Integer
Dim num As Integer
Dim s As Integer
Dim old As Integer
num = Val(Text1.Text)
old = num
s = 0
While num > 0
d = num Mod 10
s = s + (d * d * d)
num = num \ 10
Wend
If old = s Then
Label1.Caption = "Armstrong"
Else
Label1.Caption = "Not armstrong"
End If
End Sub
What are the advantages of a computerised library system?
So that the information can be managed easily, and retrieval, storage and modification can be done easily and in a faster way .
The redundancy can also be reduced ........
What is module in visual basic?
Answer
A key part of developing applications using Visual Basic is ensuring that the code is carefully structured. This involves segmenting the code into projects, modules and procedures so that it is easy to understand and maintain.
A complete Visual Basic application is typically contained in a single project. Within a project, code is placed in separate code files called modules, and within each module, the Visual Basic code is further separated into self contained and re-usable procedures.
Write an algorithm for bisection method?
#include[stdio.h]
#include[math.h]
#define epsilon 1e-6
void main()
{
double g1,g2,g,v,v1,v2,dx;
int found,converged,i;
found=0;
printf(" enter the first guess\n");
scanf("%lf",&g1);
v1=g1*g1*g1-15;
printf("value 1 is %lf\n",v1);
while (found==0)
{
printf("enter the second guess\n");
scanf("%lf",&g2);
v2=g2*g2*g2-15;
printf(" value 2 is %lf\n",v2);
if (v1*v2>0)
{found=0;}
else
found=1;
}
printf("right guess\n");
i=1;
while (converged==0)
{
printf("\n iteration=%d\n",i);
g=(g1+g2)/2;
printf("new guess is %lf\n",g);
v=g*g*g-15;
printf("new value is%lf\n",v);
if (v*v1>0)
{
g1=g;
printf("the next guess is %lf\n",g);
dx=(g1-g2)/g1;
}
else
{
g2=g;
printf("the next guess is %lf\n",g);
dx=(g1-g2)/g1;
}
if (fabs(dx)'less than' epsilon
{converged=1;}
i=i+1;
}
printf("\nth calculated value is %lf\n",v);
}
What is the general problem encountered in sales and inventory system?
The most common issues encountered are maintaining an accurate inventory. There is always an issue reconciling stock in and stock out as a miss count on delivery can throw the system a curve ball. Dealing with return of a product also has its issues as stock needs to be either be- returned and can go back in to the selling/supply route or returned and is not of a quality which will allow the product top be placed in the selling/supply route. However, this is frequently where miscounts occur as there is no track of the item once returned. Good inventory will allow the product to be - (a) scrapped and removed from site (b) Scrapped and awaiting removal to xyz destination - This is particularly important as many countries are now requiring organisations to monitor record and report waste disposal so recording this in an inventory systems is especially useful.
To balance the system it is also a positive to undertake mini stock counts on product groups, normally on a weekly basis this ensures that over a period of time stock holding is checked and accurate records made - Changes in volumes are them made as the year progresses. When a full audit is taken there are less major issues - Whilst this is a good practice many organisations fail to budget the process in and this leads to a poor accounting of the system - From a Sales perspective undertaking the aforementioned keep the sales team more informed - However, if you deal with date related products like food the it is even more essential that monitoring of stock rotation is observed as its a failing in many good company's even that staff will place lower coded products at the bottom/at the back of the storage area thus causing lost revenue and more importantly very unhappy customers who get the low and out of code products and the end of the supply chain.
Slot allocation is a very important factor within any inventory system. This is where a product is placed for the storage awaiting transfer to sales. In some circumstances a product, because of a high holding requirement may over spill to other areas of the storage area. These are missed and give the impression of lower stock levels than actually are there - again a good system will be able to have multiple storage locations associated with the products.
How do you open a project in Microsoft visual studio 2008?
Making sure that it is a 2008 project or earlier you go to open project then find the file on your computer. Double click it an d it will open (if it is older then 2008 it will ask for you to convert it first)
Importance of programming in system development?
When business organization facing a keen (鋒利的) competition in the market, rapid change of technology and fast internal demand, system development is necessary. In the system development, a business organization could adopt the systematic method for such development. Most popular system development method is system development life cycle (SDLC) which supports the business priorities of the organization, solves the identified problem, and fits within the existing organizational structure. When business organization facing a keen (鋒利的) competition in the market, rapid change of technology and fast internal demand, system development is necessary. In the system development, a business organization could adopt the systematic method for such development. Most popular system development method is system development life cycle (SDLC) which supports the business priorities of the organization, solves the identified problem, and fits within the existing organizational structure.
What are the parts of Visual basic.net?
Visual basic is a programming language from Microsoft. Some of its parts include data access objects, ActiveX data objects, and remote data objects. Their function is to provide access to databases.
What are the VB built in data types?
Visual Basic.net 2008 Datatypes
Data Type in Visual Basic.net 2008 defines the type of data a programming element should be assigned, how it should be stored and the number of bytes occupied by it.
In VB.net 2008 all the variables by default are of Variant datatype was used for numeric, date, time and string data, but in VB.net 2008 Variant and Currencydatatypes are no longer available. Following are the common data types used in Visual Basic.Net 2008.
Data TypeValue RangeByte0 to 255BooleanTrue or FalseChar0 to 65535DateJanuary 1, 0001 to December 31,9999Decimal+/-79,228,162,514,264,337,593,543,950,335 with no decimal point; +/-7.9228162514264337593543950335 with 28 place to right of decimal.Double-1.79769313486231E+308 to -4.94065645841247E-324 for negative values to 4.94065645842247E-324 to 1.79769313486231E+308 for positive values.Integer-2,147,483,648 to 2,147,483,647Long-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807ObjectAny type can be stored in a variable of type ObjectShort-32,768 to 32,767Single-3.402823 * 103 to -1.401298 * 10 45 for negative values 1.401298 * 10 -45 to 3.402823 * 10 38for positive valuesString0 to approximately 2 billion characters
What is the history of Visual Basic 6.0?
Visual Basic was first released in 1992 Visual Basic was first released in 1998. This version included the ability to create web-based applications. Support for this version ended in 2005.
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int count =0;
int sum = 0;
int positivecount = 0;
int negativecount = 0;
double average;
cout <<"Enter any integer or enter 0 to exit ::";
cin >> count;
while(count != 0)
{
sum += count;
average = sum / static_cast<double>(count);
count++;
if(count < 0)
{
negativecount++;
}
if (count > 0)
{
positivecount++;
}
cout <<"Enter any integer or enter 0 to exit ::";
cin >> count;
}
cout <<"the average of the numbers is " << average <<"\n";
cout <<"There are " << negativecount <<" negative numbers\n";
cout <<"There are " << positivecount<<" positive numbers\n";
system("pause");
return 0;
}
by rijaalu
Two pre-defined functions in visual basic?
A string is a line of text.
For example:
Dim example As String = "whatever text you want"
Would make a string that says "whatever text you want"
Later, you can use this for a msgbox or textbox
Example:
TextBox1.Text = example '(that is the string we made)
or
MsgBox(example, MsgBoxStyle.Information, "Note!") '(would display a msgbox containing the text in the string)
What are the objectives of visual basic 6?
It is not just a language to program in but a whole graphicaldevelopment environment. This aids your programming skills allowingyou to concentrate on developing novel ideas instead of going over oldground.
How do you write an assignment statement in visual basic?
You declare it by this:
Dim var as integer
or
Public var as integer
You can use other types instead of integer like long, double, string, byte etc.
Using Public is for making a variable accessible from everywhere and using Dim is for making it accessible only from where you declared it from.
For using the variable you just type:
var = 1
var = "something"
var = 5 + 10 * (2 - 3)
var = var & "abc"
var &= "abc"
In each case the variable will have these values:
1
something
-15
Whatever var had before plus abc
Again whatever var had before plus abc
These are the basics of using a variable
Write a program to print sum of the digits in the given number?
The following function will sum the digits in any positive number.
unsigned int sum_digits(unsigned int num, unsigned int base=10)
{
sum=0;
if(base>1) // base must be 2 or higher
{
while(num)
{
sum+=num%base; // add least significant digit to sum
num/=base; // shift right by base
}
}
return(sum);
}
Difference between event driven programming and traditional programming?
In traditional programming, code was run from start to finish and sometimes asked for input along the way. Event driven programming, on the other hand, does nothing until it gets an event, such as a mouse moving or a key being pressed.
What is a code window in visual basic?
The Project Explorer tree view consists of the following node types:
How do you register ActiveX control in vb 6.0?
On Windows Run prompt, type regsvr32 "<complete path of control>" and press Enter.
How do you open visual basic 6.0?
i preassume that you have correctly installed Microsoft Visual Studio 6 on ur PC if not then please install it. During installation u get a nmber of options to select ,u select all so that all the components are added to ur computer successfully. Now its that simple to open as opening any application.. The Microsoft visual studio will be added in start menu list and from there u can select Microsoft visual basic 6 easily and have fun running ur application..
What is a design mode in visual basic?
The design mode in Visual Basic allows the programmer to design and modify the form, and all objects it contains. It's a much quicker and user friendly way to program visible form objects and set up their properties.
How does a visual sensation become a visual perception?
In order for sensation to become perception, it must be received by the somatosensory cortex.
How do you create a string and reverse a string in visual basic?
Dim x As String
x = "HELLO"
Dim tmpString As String
tmpString = Nothing
For j = 0 To x.Length - 1
Dim int
int=x.Length - 1
int=int-j
tmpString=x(j)
Next