I. z = [a2 + 4ac] ÷ 2
Identify errors in the following program.After identification make correction and write correct code again
(1)
namespace FirstSessional1
{
interface MyInterface{
string name;
public void Function1();
void Function2() {Console.WriteLine("Function 2");}
}
Class Employee:MyInterface{
void Function1() { }
static void Main(string[] args)
{
MyInterface obj=MyInterface();
}
}
}
(2)
byte a=300,b=500,result;
try
{
r=a+b;
MessageBux.Display("A+B" +r);
}
catch(Exception err)
{
MessageBux.Display("Handle Exception");
}
catch(ArithmeticException ex)
{
MessageBux.Display("Handle Arithmetic Exception);
}
1.Write a code to close the curent form and show second form?
2.Write a code that raise an event after 10second,in event display your complete name using messageBox.
3.Supose you have a form that has one Button,when you click on Button,yoy should display a OpenDialogBox.When OpenDialogBox is open,if user click on Button,Show Message that you click on ok button.If user click cancel button,show messgae that yo click on cancel button.
Notify syntax eroor, if any do correct them.
(1)MsgBox.Display("Wel Come") ;
(2)txtPassword.txt="MyText" ;
(3)Project.Run(new Form1 ()) ;
(4)private void btn1Click(object sender, EventArgs e)
(5)In Click even of Button named btn_2
txtResult.Text==txtResult. Text+ "B";
Write a program in c++ to check wether a number is positive, negative or zero
can you give me example code for Python?
Make a c++ program that will print the average of the values of an array named areas with values 84, 76, 48 using while loop.
Create a c++ program that counts and displays the odd and even numbers among the 10 input values.
Array: Use 3 separate arrays. First output displays the count and list of even and odd numbers. Next output says 'All numbers are even' and third says 'All numbers are odd'
Write a program that reads in 10 midday temperatures for Port Elizabeth, for 10 consecutive days.
Only temperatures higher than 0 and less than 45 are valid (working with integer values for
temperatures). It must calculate and display the following:
• The warmest temperature
• The average temperature
• The number of days that the temperature was higher than 30
• The list of temperatures entered
write a c++ program that initializez 20 elements the program will ask the user to enter a number checks if it is an element in array