Pular para o conteúdo principal

Postagens

Mostrando postagens com o rótulo void

C++, Luz, conta de luz, leitura, void

//C++, Luz, conta de luz, leitura, void include using namespace std; void luz() {      float a, b, x, icms, total;      cout<<"\nDigite o valor de Khw:\n";      cin>>a;      cout<<"\nDigite a quantidade de Khw\n";      cin>>b;      cout<<"\nDigite o valor do ICMS:\n";      cin>>x;      icms=(a*b*x)/100;      total=(a*b)+icms;      cout<<"\nSeu consumo de luz foi de R$\n"<       }      int main()      {            luz()  ;      system("pause");       }               //os valores simulados foram R$0.60 para Kwh     //100kw consumidos e ICMS de 18%.         

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"); }