Vb program to find roots of quadratic equation?
Dim a, b, c, undroot, root, posx, negx, x1, x2 As Single
Private Sub cmdcompute_Click()
a = txta.Text
b = txtb.Text
c = txtc.Text
If txta.Text = "" Then
MsgBox "Please enter the value of A ", 0 + 32
Exit Sub
End If
If txtb.Text = "" Then
MsgBox "Please enter the value of B ", 0 + 32
Exit Sub
End If
If txtc.Text = "" Then
MsgBox "Please enter the value of C ", 0 + 32
Exit Sub
End If
If a = 0 Then
MsgBox "A can't equal 0 ", 0 + 32
Exit Sub
End If
If (b ^ 2) - 4 * a * c < 0 Then
txtx1.Text = ""
txtx2.Text = ""
MsgBox "Imaginary solution : (b^2)-4*a*c < 0", 0 + 48
Exit Sub
End If
'Calcualtions
undroot = (b ^ 2) - 4 * a * c
root = undroot ^ (0.5)
posx = (b * -1) + root
negx = (b * -1) - root
x1 = posx / (2 * a)
x2 = negx / (2 * a)
'Displaying results
txtx1.Text = " " & x1
txtx2.Text = " " & x2
End Sub
How do you make a script in interactive buddy?
a programming script is pretty high-tech, i, being a kid at quite a young age, obviously had troubles with this, but you can describe a script as a coding language that can modify the motion, physical behavior, and changes to an object in a game.you will need to piece these codes together for the language to lock up in reaction chains for them to work.here are oen of the scripts i can come up with:
fog
water(getBuddyX(), 0, 0, 0, 10, 10, 400, 400, false));
this script creates a large, but not actually very harmful, blast of water, which is the "fog".you dont need to worry about the first three zeros, but the last four numbers are critical for the type of the fog.the higher number the number you tune up for the first two, will determine the pressure of the fog.if you turn it any higher than 20, your buddy will be thrown across the wall by the force of it.if you tune it up over 50, your buddy will be instantaneously knocked out by it.the last two numbers determine the density of the fog.the lower the number, the less fog there is, and the higher the numbre, the bigger the fog is.the fog is mainly used for the cool effect and to put out widespread fires.run it every frame for a continous fog, or once for a quick punch of it.
What is null pointer assignment?
This error message means that somewhere in your program you have used a pointer-varible containing NULL-value. (Within an actual OS it with stop the program immediately, but in MS-DOS it doesn't.)
What are the Small squares callled at each corner and middle location of a selection rectangle?
Sizing handles
How can a virus get onto a computer?
Viruses usually spread to your computer disguised as a useful program that you download and install yourself. Viruses can also spread by exploiting bugs in programs many people use, like Microsoft Outlook, in order to run code on your computer that will let them install themselves. Viruses can spread this way in both emails and files.
What does a 2 dimensional array do?
A two dimensional array is a one-dimensional array of one-dimensional arrays. That is, just as we can have an array of integers, we can also have an array of integer arrays. This idea can be extended such that we can have an array of two-dimensional arrays (a three-dimensional array), and so on. We typically use a two-dimensional array to represent a table of rows and columns, where each row is a one-dimensional array.
C program on how to calculate circumference of a circle?
int radius = 2;
int output;
radius = radius * 2;
output = radius * Math.PI;
Console.WriteLine(output);
IN which Programming language flash mx is written?
Flash MX uses ActionScript for its language. It controls the movies and the items inside the movies. ActionScript is similar to JavaScript, if you are familiar with JavaScript.
Difference between lex and yacc?
I didn't write the answer myself because this fella deserves credit. See the related link below.
Why Do you think prototyping has become a popular way to develop a new computer based system?
Why do you think prototyping has become a popular way to develop new computer-based business systems?"
Which CPU scheduling Algorithm is used by Windows XP OS?
In the past (and perhaps currently as well) it has used round-robin, at one time 1 second but since updated to .1 seconds. It may also have other features such as preemptive abilities.
Priority fair scheduling.
In practice, it may be. But they are still different things.
A heuristic is a rough approximation that can help solving a problem.
For example, in a path-finding algorithm, if your destination is northbound, you may try goring north first. This is the heuristic.
It may not be correct (there may be a dead-end) but most of the time, it helps getting there faster.
Are low level computer languages portable?
low level language is not portable because using these language we are not run programs where we not create those programs or we r not able to run those programs to another machine.....
Short note on high level language?
Generally languages are used for communication, In the case of computers languages are used to communicate with the Hardware. Language consist of set of rules and syntaxes to frame the valid instructions to work with the Machines.
What is the difference between assembly language program and high level language program?
There is very little difference, functionally, between assembly language and machine level language. Each assembly language statement corresponds to one machine instruction. The difference is in readability (who wants to read and write in hex code?) and in ease of address computation.
What conditions must be satisfied by the entire elements of any given array?
All elements of any given array must satisfy the same data type requirement, meaning they should be of the same data type for the array to be well-defined and properly utilized.
Difference between if and switch in C?
The switch statement evaluates an expression, which must have an integral result. Based on that result, a branch is taken to one of the case statements, or to the default statement if present and none of the case statements match.
Note that the case statement represents a "goto" type of operation. If it is intended that each case execute without executing the following case statement(s), then each case must include a break statement.
The if-else statement evaluates an expression, which must have a logical result. If the result is true, the first target statement executes - if false, the second target statement executes.
Can data be called information?
Data is the plural of the latin word "datum" meaning what is given.Data has no meaning.Data can be facts represented in a readable language such as numbers,characters and any recording form o durable medium.When these data are being interpreted and processed to its true meaning they become useful meaning they become information.
Write a C Program to accept 5 names from user and store these names into an array?
/*Program to accept names of 5 students and display them in alphabetic order*/
#include<conio.h>
#include<stdio.h>
#include<string.h>
void main()
{
int i=0,j=0;
char frame[5],temp[5];
clrscr();
for(i=0;i<4;i++)
{
printf("\nEnter student[%d]string",i);
scanf("%s",fname[1]);
}
for(i=0;i<=4;i++)
{
for(j=i+1;j<=4;j++)
{
if(strcmp(fname[i],fname[i])>0)
{
strcpy(temp,fname[i]);
strcpy(fname[i],fname[i]);
strcpy(fname[j],temp);
}
}
}
printf("The names of the students in alphabetic order is:");
for(i=0;i<=4;i++)
{
printf("\n%s",fname[i]);
}
getch();
}
How do you How do you write the special number program in java?
// Addition program that displays the sum of two numbers.
import java.util.Scanner; // program uses class Scanner
public class Addition
{
// main method begins execution of Java application
public static void main( String args[] )
{
// create Scanner to obtain input from command window
Scanner input = new Scanner( System.in );
int number1; // first number to add
int number2; // second number to add
int sum; // sum of number1 and number2
System.out.print( "Enter first integer: " ); // prompt
number1 = input.nextInt(); // read first number from user
System.out.print( "Enter second integer: " ); // prompt
number2 = input.nextInt(); // read second number from user
sum = number1 + number2; // add numbers
System.out.printf( "Sum is %d\n", sum ); // display sum
} // end method main
} // end class Addition
What are the objectives of system analysis and design?
Answer
System development can generally be thought of having two major components: systems analysis and systems design.In System Analysis more emphasis is given to understanding the details of an existing system or a proposed one and then deciding whether the proposed system is desirable or not and whether the existing system needs improvements. Thus, system analysis is the process of investigating a system, identifying problems, and using the information to recommend improvements to the system.
For more http://www.freetutes.com/systemanalysis
What function initializes variables in a class?
you have to initialize it into the "Constructor" which is a function without dataType and it's name is the same with the class name
EX:-
class Exforsys
{
private:
int a,b;
public:
Exforsys();
...
};
Exforsys :: Exforsys()
{
a=0;
b=0;
}
the EX from : http://www.exforsys.com/tutorials/c-plus-plus/class-constructors-and-destructors-in-c.html
I recommend this link for You Under the title "Constructors and destructors" :
http://www.cplusplus.com/doc/tutorial/classes/
You can also See : http://www.win.tue.nl/~maubach/university/education/online-references/cpp/swartz/notescpp/oop-condestructors/constructors.html