Er.ANANTA RAJ SHRESTHA - Computer Engineer at Govt. of Nepal
"You will win definitely but not immediately"
Sunday, June 11, 2023
Saturday, January 4, 2020
Saturday, December 28, 2019
Sunday, April 14, 2019
clock in C++
1.Code for Clock in C++ by ARS
#include<iostream>
#include<conio.h>
#include<cstring>
using namespace std;
int main()
{
int h,m,s,i,j,k;
char c[5],d[10],n[17];
while(1)
{
for(k=0;k<4;k++)
{
switch(k)
{
case 0:
strcpy(n,"baisakha");
break;
}
for(j=0;j<7;j++)
{
switch(j)
{
case 0:
strcpy(d,"sunday");
break;
case 1:
strcpy(d,"monday");
break;
case 2:
strcpy(d,"tuesday");
break;
case 3:
strcpy(d,"wednesday");
break;
case 4:
strcpy(d,"thursday");
break;
case 5:
strcpy(d,"friday");
break;
case 6:
strcpy(d,"saturday");
break;
}
for(h=0;h<24;h++)
{
if(h>12)
{
strcpy(c,"AM");
}
else
{
strcpy(c,"PM");
}
for(m=0;m<60;m++)
{
for(s=0;s<60;s++)
{
system("cls");
cout<<"current time:"<<h<<":"<<m<<":"<<s<<":"<<c<<" Day:"<<d<<" month:"<<n<<endl<<" designed or developed by -sotware engineer ananta raj stha";
for(i=0;i<169999999;i++)
{
i++;
i--;
}
}
}
}
}
}
}
getch();
return 0;
}
#include<iostream>
#include<conio.h>
#include<cstring>
using namespace std;
int main()
{
int h,m,s,i,j,k;
char c[5],d[10],n[17];
while(1)
{
for(k=0;k<4;k++)
{
switch(k)
{
case 0:
strcpy(n,"baisakha");
break;
}
for(j=0;j<7;j++)
{
switch(j)
{
case 0:
strcpy(d,"sunday");
break;
case 1:
strcpy(d,"monday");
break;
case 2:
strcpy(d,"tuesday");
break;
case 3:
strcpy(d,"wednesday");
break;
case 4:
strcpy(d,"thursday");
break;
case 5:
strcpy(d,"friday");
break;
case 6:
strcpy(d,"saturday");
break;
}
for(h=0;h<24;h++)
{
if(h>12)
{
strcpy(c,"AM");
}
else
{
strcpy(c,"PM");
}
for(m=0;m<60;m++)
{
for(s=0;s<60;s++)
{
system("cls");
cout<<"current time:"<<h<<":"<<m<<":"<<s<<":"<<c<<" Day:"<<d<<" month:"<<n<<endl<<" designed or developed by -sotware engineer ananta raj stha";
for(i=0;i<169999999;i++)
{
i++;
i--;
}
}
}
}
}
}
}
getch();
return 0;
}
Subscribe to:
Posts (Atom)
-
Happy New Year हिजाे,अाज र भाेलि हिजाे जनताका लागि सास रहेसम्म लड्थे काेहि! अाज देशकाे लागि भाेकाे पेट लड्दैन काेहि!! भाेलि देशकाे अस्त...
-
1 .Code for Clock in C++ by ARS #include<iostream> #include<conio.h> #include<cstring> using namespace std; int main...