Search found 32 matches

by Jewel of DIU
Sun Aug 03, 2003 12:21 pm
Forum: Algorithms
Topic: Need code of "Combinations" in "c"
Replies: 1
Views: 1551

Need code of "Combinations" in "c"

I need code of combination generation.
code must be in "C".
Input
[c]ab
ba[/c]
output
[c]ab
ba
ba
ab
[/c]
by Jewel of DIU
Thu Jul 31, 2003 8:35 am
Forum: Volume 105 (10500-10599)
Topic: 10532 - Combination! Once Again
Replies: 15
Views: 4666

10532 - Combination! Once Again

Hai everybody. Any one tell me why this code got WA: [# include <stdio.h> double fact(double a) { double i,b; b = 1; for( i = 1; i <= a; i++) { b = b*i; } return b; } int main() { double a,b,c,n,r,t,out,d; long cas = 0,j,i; char cls, grb[1000]; while(scanf("%lf %lf%c",&n,&t,&cls)==3) { if(n == 0) br...

Go to advanced search