Programlama | Programlama Dilleri | C Programlama Dili |C++



Rastgele Seçilen Yirmi Say?dan 7 ?le Kalans?z Olanlar? ve Toplamlar?n? Bulmak

AÇIKLAMA

Bu program C veya C++ derleyicisinde geli?tirilmi? olan bu programda bilgisayar?n 0 ile 100 aras?nda bulunan say?lardan rastgele seçti?i 20 say?dan 7 ile kalans?z olarak bölünebilenleri bulunmu? ve bu say?lar?n toplam? sonuç olarak gösterilmi?tir.

Program Kodu:

  1. //---------------------------------------------------------------------------
  2.  
  3. #include <vcl.h>
  4. #pragma hdrstop
  5. #include <stdio.h>
  6. #include <conio.h>
  7. //---------------------------------------------------------------------------
  8.  
  9. #pragma argsused
  10. int main(int argc, char* argv[])
  11. {
  12. int toplam=0;
  13. randomize();
  14. int dizi[20];
  15. for(int i=0;i<20;i++)
  16. dizi[i]=random(100);
  17. printf("Rastgele Tutulan Sayilar:\n");
  18. for(int i=0;i<20;i++)
  19. printf("%d ",dizi[i]);
  20. printf("\n7 ile Tam Bolunen Sayilar:\n");
  21. for(int i=0;i<20;i++)
  22. {
  23. if(dizi[i]%7==0)
  24. {
  25. printf("%d ",dizi[i]);
  26. toplam+=dizi[i];
  27. }
  28. }
  29. printf("\n7 ile Tam Bolunen Sayilarin Toplami: %d\n",toplam);
  30. getche();
  31.  
  32.  
  33.         return 0;
  34. }
  35. //---------------------------------------------------------------------------
  36.  
  37.  
  38.  

 

Yorumlar (0)
Sadece kayıtlı kullanıcılar yorum yazabilir!
 
backlinktr.biz | 523: Origin is unreachable

Error 523 Ray ID: 5355348e2fb27ec8 • 2019-11-14 01:27:51 UTC

Origin is unreachable

You

Browser

Working
Budapest

Cloudflare

Working
backlinktr.biz

Host

Error

What happened?

The origin web server is not reachable.

What can I do?

If you're a visitor of this website:

Please try again in a few minutes.

If you're the owner of this website:

Check your DNS Settings. A 523 error means that Cloudflare could not reach your host web server. The most common cause is that your DNS settings are incorrect. Please contact your hosting provider to confirm your origin IP and then make sure the correct IP is listed for your A record in your Cloudflare DNS Settings page. Additional troubleshooting information here.