Categories: Örnek Kaynak Kodlar

5-30 Arasindaki Sayilar Carpimi CPP

5 ten 30 a kadar ki 5’in katları olan sayıları birbirleri ile çarpıp ekrana yazdırıyor.


#include <stdio.h>
#include <stdlib.h>
main()
{
long product=1;
int array[7];
int x=5;
for(int i=0;i<7;i++)
{
array[i]=x;
x=x+5;
}
//product line
for(int z=0;z<7;z++)
{
product=product*array[z];
}
printf(“Product of 7 nums between 5-30 is : %ld”,product);
}


Kaynak: Doğu Akdeniz Univ. CSIT Labworks
belgesi-419
Belgeci

Share
Published by
Belgeci

Recent Posts

İlk Cep Telefonu

ÖZELLİKLER: Boyut: 28x8x6 cm Ağırlık: 850gr Ekran: Yok Devre sayısı: 30 Konuşma süresi: 35 dakika…

11 saat ago

Basic Grammar-Questions

There are two kinds of questions: yes or no questions and wh- questions. You ask…

23 saat ago

Basic Grammar-Positive And Negative Sentences

A positive sentence tells you that something is so. A sentence that tells you something…

1 gün ago

Basic Grammar-The Imperative

Use the base form of a verb to give commands or make direct requests. This…

2 gün ago

Basic Grammar-Sentences

A sentence is a group of words that expresses a complete thought. A sentence must…

2 gün ago

Basic Grammar-Interjections

An interjection is a word that expresses a sudden, strong feeling such as surprise, pain,…

3 gün ago