Arama butonu
Bu konudaki kullanıcılar: 1 misafir
2
Cevap
596
Tıklama
0
Öne Çıkarma
array
V
13 yıl
Yüzbaşı
Konu Sahibi

printf("You may enter up to 100 numbers.\nPlease enter an integer:");
scanf_s("%d",&readNum);

if(readNum>100)
printf("Error.It exceeds 100 numbers.\nPlease enter an integer:");

for( i = 0; i < readNum; i++)
scanf_s("%d",&arr);

sumAllOdd = sumOdd();
}

int sumOdd(int x)
{
int i;
int temp=0;
int arr[100];
for(i=0;i<100; i++)
{
if(arr%2==0)
return 0;
else
temp += arr;
return 1;
}
}

#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;

int a;
int total = 0;
int main(){
//generates a new random set each time:
srand(time(0));

int num = 0;

for(int i = 0; i < 25; i++){
//random numbers from 0 to 15:
arr = rand() % 1000 + 900;

if(num % 2 = 0){
cout<<"error"<<end;

else{
num = a;
total = total + a;



#include <iostream>
#include <cmath>
#include <ctime>





< Bu mesaj bu kişi tarafından değiştirildi veysel93 -- 4 Ocak 2013; 17:02:46 >

V
13 yıl
Yüzbaşı
Konu Sahibi

#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;

int main(){
//generates a new random set each time:
srand(time(0));

int num = 0;

for(int i = 0; i < 25; i++){
//random numbers from 0 to 15:
num = rand() % 15;
for(int j = 0; j < num; j++) cout << "*";
cout << endl;
}

return 0;
}



#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;

int main(){
//generates a new random set each time:
srand(time(0));

int arr[25] = {0};

for(int i = 0; i < 1000; i++){
//random numbers from 1 to 10:
arr[rand() % 25]++;
}

for(i = 0; i < 25; i++){
cout << i << " was generated: " << arr << " times.\n";
}

return 0;
}





< Bu mesaj bu kişi tarafından değiştirildi veysel93 -- 4 Ocak 2013; 16:49:34 >
Bu mesaja 1 cevap geldi.
M
13 yıl
Çavuş

printf("You may enter up to 100 numbers.\nPlease enter an integer:");
scanf_s("%d",&readNum);

if(readNum>100)
printf("Error.It exceeds 100 numbers.\nPlease enter an integer:");

for( i = 0; i < readNum; i++)
scanf_s("%d",&arr);

sumAllOdd = sumOdd();
}

int sumOdd(int x)
{
int i;
int temp=0;
int arr[100];
for(i=0;i<100; i++)
{
if(arr%2==0)
return 0;
else
temp += arr;
return 1;
}
}

#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;

int a;
int total = 0;
int main(){
//generates a new random set each time:
srand(time(0));

int num = 0;

for(int i = 0; i < 25; i++){
//random numbers from 0 to 15:
arr = rand() % 1000 + 900;

if(num % 2 = 0){
cout<<"error"<<end;

else{
num = a;
total = total + a;



#include <iostream>
#include <cmath>
#include <ctime>



DH Mobil uygulaması ile devam edin. Mobil tarayıcınız ile mümkün olanların yanı sıra, birçok yeni ve faydalı özelliğe erişin. Gizle ve güncelleme çıkana kadar tekrar gösterme.