Pages

Thursday, October 22, 2009

UVA Problem#458

Question:

Solutions :
#include<stdio.h>
#include<string.h>

char s[1000000];

int main(){
int i, l, c;
while(gets(s) != NULL){
l = strlen(s);
for(i=0; i<l; i++){
c = s[i]-7;
printf("%c", c);
}
printf("\n");
}
return 0;
}

UVA Problem#424

Question:

Solution: 
char f[100000], s[100000], r[100000]; 
void add(char f[], char s[], char r[]){ 
int lf, ls, d, i, j=0, c=0, sum; lf=strlen(f);
ls=strlen(s); 
reverse(f, f+lf); 
reverse(s, s+ls); 

UVA Problem#382

Question:

Solution: 
void perfection(int n){
int i , sum=0, m=n/2; 
for(i=1; i<=m; i++){ 
if(n%i==0)
sum += i; 
}
if(n>sum){ 
printf("DEFICIENT\n"); 
}
else if(n<sum){ 
printf("ABUNDANT\n"); 
}
else if(n == sum){
printf("PERFECT\n"); 
}
  int main(){
....
.... 
}  

Friday, October 9, 2009

The Art of Computer Programming by Donald E. Knuth (Boxed_Set_Vol_1-4.part2)

The Art of Computer Programming by Donald E. Knuth. The link to download the 2nd part of the book is given below.

click here to download

The Art of Computer Programming by Donald E. Knuth (Boxed_Set_Vol_1-4.part2)

The Art of Computer Programming by Donald E. Knuth. The link to download the 2nd part of the book is given below.

click here to download

The Art of Computer Programming by Donald E. Knuth (Boxed_Set_Vol_1-4.part1)

The Art of Computer Programming by Donald E. Knuth. Here is the link to download the 1st part.


click here to download

A Computational Introduction To Number Theory And Algebra

A Computational Introduction to Number Theory by Victor Shoup

click here to download

Password to unzip/unrar: www.ebooksdb.com