//Program for Interest calculation using the concept of default arguments #include<iostream.h> #include<conio.h> void main() { float amount, principal; int time; float interest(float p, int n, float r=0.15); cout<<"Program for simple interest calculation"<<endl; cout<<"Please enter principal amount:"; cin>>principal; cout<<"Please enter Time: "; cin>>time; amount=interest(principal, time); cout<<"\nThe amount is:"<<amount; cout<<"\nPress any key to continue..."; getch(); } float interest(float p, int n,float r) { return (p+((p*r*n)/100.0)); }
1. Computer uses the_________number system to store data and perform calculations. 1) Binary 2) octal 3) Decimal 4) Hexadecimal 5) None of these 2. .............. is the process of carrying out commands 1) Fetching 2) Storing 3) Decoding 4) Executing 5) None of these 3. In word, when you indent a paragraph, you .... 1) push the text in with respect to the margin 2) change the margins on the page 3) move the text up by one line 4) move the text down by one line 5) None of these 4. ASCII stands for ......... 1) American Special Computer for Information Interaction 2) American Standard Computer for Information Interchange 3) American Special Code for Information Interchange 4) American Special Computer for Information Interchange 5) American Standard Code for Information Interchange 5. Which of the following is used by the browser to connect to the location of the Internet resources ? 1) Linkers 2) Protocol 3) Cable 4) URL 5) None of these 6. ……….is the process of dividing the dis...
Program: Maximum number in three numbers User Interface Coding: Function calMax(x, y, z As Variant) If x > y And x > z Then calMax = Str(x) ElseIf y > x And y > z Then calMax = Str(y) ElseIf z > x And z > y Then calMax = Str(z) End If End Function Private Sub Command1_Click() Dim a, b, c a = Val(Txt_Num1.Text) b = Val(Txt_Num2.Text) c = Val(Txt_Num3.Text) Lbl_Display.Caption = calMax(a, b, c) End Sub Private Sub Label5_Click() End Sub Private Sub Form_Load() End Sub
Comments
Post a Comment