> Могу VS подкинуть если надо.
// crt_difftime.c
/* This program calculates the amount of time
* needed to do a floating-point multiply 500 million times.
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main( void )
{
time_t start, finish;
long loop;
double result, elapsed_time;
printf( "Multiplying 2 floating point numbers 500 million times...\n" );
time( &start );
for( loop = 0; loop < 500000000; loop++ )
result = 3.63 * 5.27;
time( &finish );
elapsed_time = difftime( finish, start );
printf( "\nProgram takes %6.0f seconds.\n", elapsed_time );
}
// crt_times.c
/* This program demonstrates these time and date functions:
* _time64 _ftime64 _ctime64 asctime
* _localtime64 _gmtime64 _mktime64 _tzset
* _strtime _strdate strftime
*
* Also the global variable:
* _tzname
*/
#include <time.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/timeb.h>
#include <string.h>
int main()
{
char tmpbuf[128], ampm[] = "AM";
__time64_t ltime;
struct __timeb64 tstruct;
struct tm *today, *gmt, xmas = { 0, 0, 12, 25, 11, 93 };
/* Set time zone from TZ environment variable. If TZ is not set,
* the operating system is queried to obtain the default value
* for the variable.
*/
_tzset();
/* Display operating system-style date and time. */
_strtime( tmpbuf );
printf( "OS time:\t\t\t\t%s\n", tmpbuf );
_strdate( tmpbuf );
printf( "OS date:\t\t\t\t%s\n", tmpbuf );
/* Get UNIX-style time and display as number and string. */
_time64( <ime );
printf( "Time in seconds since UTC 1/1/70:\t%ld\n", ltime );
printf( "UNIX time and date:\t\t\t%s", _ctime64( <ime ) );
/* Display UTC. */
gmt = _gmtime64( <ime );
printf( "Coordinated universal time:\t\t%s", asctime( gmt ) );
/* Convert to time structure and adjust for PM if necessary. */
today = _localtime64( <ime );
if( today->tm_hour >= 12 )
{
strcpy( ampm, "PM" );
today->tm_hour -= 12;
}
if( today->tm_hour == 0 ) /* Adjust if midnight hour. */
today->tm_hour = 12;
/* Note how pointer addition is used to skip the first 11
* characters and printf is used to trim off terminating
* characters.
*/
printf( "12-hour time:\t\t\t\t%.8s %s\n",
asctime( today ) + 11, ampm );
/* Print additional time information. */
_ftime64( &tstruct );
printf( "Plus milliseconds:\t\t\t%u\n", tstruct.millitm );
printf( "Zone difference in hours from UTC:\t%u\n",
tstruct.timezone/60 );
printf( "Time zone name:\t\t\t\t%s\n", _tzname[0] );
printf( "Daylight savings:\t\t\t%s\n",
tstruct.dstflag ? "YES" : "NO" );
/* Make time for noon on Christmas, 1993. */
if( _mktime64( &xmas ) != (__time64_t)-1 )
printf( "Christmas\t\t\t\t%s\n", asctime( &xmas ) );
/* Use time structure to build a customized time string. */
today = _localtime64( <ime );
/* Use strftime to build a customized time string. */
strftime( tmpbuf, 128,
"Today is %A, day %d of %B in the year %Y.\n", today );
printf( tmpbuf );
}
PS: плохо без хорошей книжки...
А что в инете нет в электронном виде?
Или нет каких нибудь статей на эту тему?
Нашёл бы не спрашивал.
Но проблема решена:) Lucefer, спасибо за помощь.
10 INPUT A
20 LET B = A + 1
30 PRINT B
40 END
да ты.......программист:)
...да, весёлый язык программирования:)
Басик рулит !!!!!!!!
да.....для самых маленьких так сказать:)
лет 10 назад я с него начинал:) ещё на советских компутерах....
А ты чо "отец" программирования ???
По-любому басик надо знать !!!
А там всякие паскали с дэлфи это уж кому надо !
ну зачем сразу отец, называй просто...папа : ))) :b
Завите меня просто - Хозяин.
Нихтрик = страшный флудер!!!
Просто в любой теме ты влезаешь и пишешь всякую муру!!!
Разводишь флуд!!!
Последний пост подтверждение!!!
На ЛЮБОМ форуме тебя бы забанили давно бы!!!
Извините, парни, за оффтоп, но блин даже в серьёзной теме (как эта) Нихтр влезет и начинает фигню гнать!!! ;D
Во вторых я давно думал почему ДЕВАР - ХОЗЯИН ???