Pular para o conteúdo principal

Postagens

Mostrando postagens com o rótulo C++

C, countdown, int, long, void, loop, start

/countdown  //codefree.mxatec.com #include void main() { int start; long delay; /* This loop ensures they type in the proper value */ do { printf("Please enter the number to start\n"); printf("the countdown (1 to 1000):"); scanf("%i",&start); } while(start<1 start="">1000); /* The countdown loop */ //Example of a "nested loop" do { printf("T-minus %i\n",start); start--; for(delay=0;delay<1000000 class="Apple-tab-span" delay="" span="" style="white-space: pre;"> //delay loop } while(start>0); printf("Zero!\nBlast off!\n"); system("pause"); }

C, strcpy, char, repeat, because I'm happy, sring.h

#include #include int main() {     system("color 1f");     char message[10];     int count,i;     strcpy(message,"because I'm Happy!!");     printf("Repeat how many times?");     scanf("%d",&count);     for(i=0;i     printf("%3d-%s\n",i,message);     system("pause"); }

C, rand_max, srand, value max, epoch!!

#include #include int main() {     system("color 1f");     int i;     printf("RAND_MAX is %u\n", RAND_MAX);     srand(time(0));     printf("random values from 0 to RAND_MAX\n");     for(i=0;i<50 font="" i="">     printf("%d\n", rand());     printf("randon values from 1 to 100\n");     for(i=0;i<50 font="" i="">     printf("%d\n",(rand()%100)+1);     system("pause"); } Link para o programa!!

Dev-C++

Série: Compiladores Nome:  Dev-C++ Dev-C++ é um Ambiente de Desenvolvimento Integrado (IDE - Integrated Development Environment) para programação na linguagem C/C++. Link para Download: http: Dev-C++