Posts

Visual basic program to create calculator with extra two button for factorial and check even/odd.

Image
Design window  :- Take button on form and one textbox on form and make it place as shown below and then in code window of each button do following coding. Dim operand1 As Double Dim operand2 As Double Dim operator As String Private Sub Command1_Click() Text1.Text = Text1.Text + "1" End Sub Private Sub Command2_Click() Text1.Text = Text1.Text + "2" End Sub Private Sub Command3_Click() Text1.Text = Text1.Text + "3" End Sub Private Sub Command4_Click() Text1.Text = Text1.Text + "4" End Sub Private Sub Command5_Click() Text1.Text = Text1.Text + "5" End Sub Private Sub Command6_Click() Text1.Text = Text1.Text + "6" End Sub Private Sub Command7_Click() Text1.Text = Text1.Text + "7" End Sub Private Sub Command8_Click() Text1.Text = Text1.Text + "8" End Sub Private Sub Command9_Click() Text1.Text = Text1.Text + "9" End Sub Private Sub Command10_Click() ...

Write a C++ program using class to sort an integer array and float array element in ascending order using bubble sort method use function overloading

Write a C++ program using class to sort an integer array and float array element in ascending order using bubble sort method use function overloading #include<stdio.h> #include<conio.h> #include<iostream.h> #include<float.h> class bubble { public:void array(int ans);        void array(float ans); }; void bubble:: array(int ans)        {        cout<<"\n"<<ans;        } void bubble::array(float ans)        {        cout<<"\n"<<ans;        } int main() { bubble bb; int i,j,n,a[20],temp=0; float b[20]; clrscr(); cout<<"\n Enter how many integer number you want to enter:-"; cin>>n; for(i=0;i<n;i++) cin>>a[i]; n=n-1; for(i=0;i<n;i++) { for(j=0;j<n-i;j++) { if(a[j]>a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=te...