Showing posts with label simple. Show all posts
Showing posts with label simple. Show all posts

Saturday, March 10, 2012

Write a C program to print the following Pattern

A) 1      
     1 2
     1 2 3
     1 2 3 4 


#include
#include
void main()
{
int i,j;
clrscr();
for(i=0;i<5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ", j);
}
printf("\n");
}
getch();
}


B)  1
      2 2
      3 3 3
      4 4 4 4 

#include
#include
void main()
{
int i,j;
clrscr();
for(i=0;i<5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ", i);
}
printf("\n");
}
getch();
}





Tuesday, February 22, 2011

Write a Visual Basic program to Find the simple interest

WAP to Find the simple interest.
_______________________________
Private Sub Command1_Click()
Dim a
Dim b, c, d As Double

a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
d = (a * b * c) / 100
Label6.Caption = d




End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Label6.Caption = ""

End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Form_Load()

End Sub

______________________________
OUTPUT
______________________________




____________________________________
DOWNLOAD
____________________________________

Download its form

Download its Image