Wednesday, 10 September 2014
Tuesday, 9 September 2014
Sunday, 7 September 2014
Monday, 1 September 2014
Thursday, 17 July 2014
Three times the sum of digits of the number equals number itself.
// num = 27 = 3*(2+7)
// AIM: To find all such numbers
#include<stdio.h>
void main()
{
long num = 1, i;
int temp = 0;
long test = 0;
long count = 0;
while(count < 100)
{
i = num;
test = 0;
while(i != 0)
{
temp = i % 10;
test = test + temp;
i = i / 10;
}
if( (test*3) == num)
{
printf("found : %d", num);
//only such number is 27, u can check upto infinite but no use, I already tried. :P
}
//printf("num = %d and test*3 = %d\n",num, test*3);
count++;
num++;
}
}
// AIM: To find all such numbers
#include<stdio.h>
void main()
{
long num = 1, i;
int temp = 0;
long test = 0;
long count = 0;
while(count < 100)
{
i = num;
test = 0;
while(i != 0)
{
temp = i % 10;
test = test + temp;
i = i / 10;
}
if( (test*3) == num)
{
printf("found : %d", num);
//only such number is 27, u can check upto infinite but no use, I already tried. :P
}
//printf("num = %d and test*3 = %d\n",num, test*3);
count++;
num++;
}
}
Thursday, 19 June 2014
Tuesday, 22 April 2014
Saturday, 11 January 2014
Automatically Refresh/Reload a Web Page at fixed Interval of Time (Using VB Script)
Copy the code below to notepad and save it as refresh.vbs
Double click on the file to run the script.
On Error Resume Next
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "http://www.youtube.com/watch?v=81MV1agQMG4"
objExplorer.Visible = 1
Wscript.Sleep 5000
Set objDoc = objExplorer.Document
Do While True
Wscript.Sleep 5000
objDoc.Location.Reload(True)
If Err <> 0 Then
Wscript.Quit
End If
Loop
Double click on the file to run the script.
On Error Resume Next
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "http://www.youtube.com/watch?v=81MV1agQMG4"
objExplorer.Visible = 1
Wscript.Sleep 5000
Set objDoc = objExplorer.Document
Do While True
Wscript.Sleep 5000
objDoc.Location.Reload(True)
If Err <> 0 Then
Wscript.Quit
End If
Loop
TEXT TO SPEECH (Using VB Script)
Copy the code below to notepad and save it as filename.vbs
Double click on the file to run the script.
dim m, s
m=inputbox("Enter text","Text2Speech")
set s=createobject("sapi.spvoice")
s.Speak m
Double click on the file to run the script.
dim m, s
m=inputbox("Enter text","Text2Speech")
set s=createobject("sapi.spvoice")
s.Speak m
Subscribe to:
Comments (Atom)


