There wasn't like that
Type: Posts; User: alperen1994
There wasn't like that
The Question was :
There are 100 balls which are same and 5 boxes
in the that there will be at least 6 balls in each box.
how many ways there can be??
a)C(100,5)
b)C(70,5)
c)C(70,5)-5!...
for example C(100,5)=????
can explain more????
there was no function like that
C(m + n, 2)==>i saw this on a test what does it mean????
i wrote this program,there are some problems
#include <stdio.h>
long int pow(int a,int b){
int x=0,y=1;
while(x<b){
y*=a;
thank u alot u saved alot of trouble
int fakt(int a){
int x,y=1;
for(x=1;x<=a;x++){
y*=x;
}
return y;
}
int main(){
tried it 2
i tested the fakt function
tried it , it doesn"t solve it
of course
I have this piece of code
int main(){
int x;
printf("number:");
scanf( "%d" , &x);
printf("x!== %d",x,fakt(x));
getchar();
return 0;
When i problem-solve i get this sign"Stack ovelflow" how can getover this???
Computing teacher gave me homework to make a program which checks if a number is prime i wrote this:
int asal(int a,int b){
if(b=1){return 2;}
else if(a%b!=0){return asal(a,b-1);}
else...
let say i have two loops and i want to check if the varibles from one loop can evenly divided like this
for (y=1;y<5;y++){
for (x=0;x<1000;x++){
if (x%y==0){ printf("this one:...
so how can i do it????
(i am asking because i want learn new ways to make it)
(i am in the computer olimpics this year,wish me luck)
i am trying to make program that checks if the number is a prime or not:
int asal(int a,int b){
int x;
for(x=2;x<a;x++){
if(a%x!=0){return a;}
else {return b;}}}
but when i do this...
i am trying to make a program that checks if the number is a prime number:
#include <stdio.h>
int prime( int a )
int main(){
int b;
printf("type in the number:")
i have been writing program that will find the smallest number which divide with all numbers between 0 and 10 i tshould be 2520 but it makes mistakes here is the code
#include <stdio.h>
int...
i want the all numbers between 0-50000 that can divided with all numbers between 0-11
i made one loop which has another loop inside it like this:
for(y=1;y<11;y+=1){
for(x=0;x<5000;x+=1){
if (x % y==0){
printf("%d \n",x);}}}
when i run it tries the if condition...
i use Visual c++ 2008 and when write this
#include <stdio.h>
int main(){
int x;
for ( x=0;x<10;x++ ){
printf("%d \n",&x);}
getchar();}
how can i sum all values that i got from a loop????