Uva 12478 – Hardest Problem Ever (Easy)

Problem:-http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=3922 Solution :- #include <stdio.h>int main (){printf(“KABIRn”);return 0;} At First you can try to solve this problem if you can’t than see this code & find what’s your problem . If you copy paste this code you could not improve yourself in programming...

Uva 11219 – How old are you?

Problem Link Solution :- How old are you? C++ #include <stdio.h> int main() { int a,b,c,e,g,f,k,i,j,t; while(scanf("%d",&t)==1) { for(i=1;i<=t;i++) { scanf("%d/%d/%d",&a, &b, &c); scanf( "%d/%d/%d",&e, &f, &g); k=(c-g); if(b<f) k--; else if(b==f) { if(a<e) k--; } if(k<0) printf("Case #%d: Invalid birth date\n", i ); else if(k>130) printf("Case #%d: Check birth date\n", i); else printf("Case #%d: %d\n",i,k); } } return 0; } 12345678910111213141516171819202122232425262728 #include <stdio.h>int main(){    int a,b,c,e,g,f,k,i,j,t;    while(scanf("%d",&t)==1)    {        for(i=1;i<=t;i++)        {            scanf("%d/%d/%d",&a, &b, &c);            scanf( "%d/%d/%d",&e, &f, &g);            k=(c-g);            if(b<f)                k--;            else if(b==f)            {                if(a<e)                k--;            }            if(k<0)                printf("Case #%d: Invalid birth date\n", i );            else if(k>130)                printf("Case #%d: Check birth date\n", i);            else                printf("Case #%d: %d\n",i,k);        }    }    return 0;}...

Uva 10696 – f91

 Problem Link Solution :- f91 C++ /*------------------------------------------------*/ //Uva Problem No: 10696 //Problem Name : f91 //Type : Ad hoc. //Author : Shipu Ahamed //University : BUBT //E-mail : shipuahamed01@gmail.com /*--------------------------------------------*/ #include <stdio.h> int main() { int n; while(scanf("%d",&n)==1&&n!=0) { if(n <= 101) printf("f91(%d) = 91n",n); else printf("f91(%d) = %dn",n,n-10); } return 0; } 123456789101112131415161718192021 /*------------------------------------------------*///Uva Problem No: 10696//Problem Name  : f91//Type          : Ad hoc.//Author        : Shipu Ahamed//University    : BUBT//E-mail        : shipuahamed01@gmail.com/*--------------------------------------------*/ #include <stdio.h>int main(){  int n;    while(scanf("%d",&n)==1&&n!=0)    {        if(n <= 101)        printf("f91(%d) = 91n",n);        else        printf("f91(%d) = %dn",n,n-10);    }    return 0;}...

Uva 11805 – Bafana Bafana

Problem Link Solution :- Bafana Bafana C++ #include<stdio.h> int main() { int n,k,p,a,s,i; while(scanf("%d",&a)==1) { for(i=1;i<=a;i++) { scanf("%d%d%d",&n,&k,&p); s=k+p; while(s>n) { s=s-n; } printf("Case %d: %dn",i,s); } } return 0; } 12345678910111213141516171819 #include<stdio.h>int main(){    int n,k,p,a,s,i;    while(scanf("%d",&a)==1)    {        for(i=1;i<=a;i++)        {            scanf("%d%d%d",&n,&k,&p);            s=k+p;            while(s>n)            {                s=s-n;            }            printf("Case %d: %dn",i,s);        }    }    return 0;}...

Uva 10783 – Odd Sum

Problem:-http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1724 Solution :- #include<stdio.h>int main(){int a,b,c,s,i,j;while (scanf(“%d”,&c)==1){for(i=1;i<=c;i++){scanf(“%d %d”,&a,&b);s=0;if(a%2==0)a=a+1;for(j=a;j<=b;j=j+2)s+=j;printf(“Case %d: %dn”,i,s);}}return (0);} At First you can try to solve this problem if you can’t than see this code & find what’s your problem . If you copy paste this code you could not improve yourself in programming...