google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.

Thursday, February 26, 2015

Write a C++ program to reverse case of each alphabet in the string

Consider the following class mystring
class mystring
{
char str[100];
public:\\methods
};
overload operator "!" to reverse case of each alphabet in the string


#include<iostream.h>
#include<string.h>
#include<conio.h>
class mystring
{
char str[100];
public:void accept()
       {
       cout<<"\n Enter string:-";
       cin>>str;
       }
       void operator !();
};
void mystring::operator !()
       {
       int len;
       len=strlen(str);
       cout<<"\n Reverse string is:-";
       for(int i=len-1;i>=0;i--)
       cout<<str[i];
       }
int main()
{
mystring m1;
clrscr();
m1.accept();
!m1;
getch();
return 0;
}



======================================================
OUTPUT :-

Enter string:-stop

Reverse string is:-pots

Monday, February 23, 2015

Write a visual basic program for stopwatch

Write a visual basic program for stopwatch:-

Design Window:-


Code:-

Dim starttime As Date
Dim s As Date
Private Sub Reset_Click()
Timer1.Enabled = False
starttime = Now
Timer1.Enabled = True
End Sub

Private Sub Start_Click()
starttime = Now
Timer1.Enabled = True
End Sub

Private Sub Stop_Click()
Timer1.Enabled = False
Label1.Caption = ""
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
End Sub

Private Sub Pause_Click()
If Pause.Caption = "Pause" Then
Timer1.Enabled = False
s1 = Label1.Caption
Pause.Caption = "Play"
End If
If Pause.Caption = "Play" Then
    Label1.Caption = s1
    Timer1.Enabled = True
End If
End Sub

Private Sub Timer1_Timer()
Label1.Caption = Format$(Now - starttime, "hh:mm:ss:ms")
End Sub

============================================
OUTPUT



अच्छे विचार करे विचार

  पहचान की नुमाईश, जरा कम करें... जहाँ भी "मैं" लिखा है, उसे "हम" करें... हमारी "इच्छाओं" से ज़्यादा "सुन...