UVa 401 - Palindromes.cpp February 12, 2015 Critical Input & Output 2BBS -- is not a palindrome. B2SB -- is not a palindrome. BBB -- is a regular palindrome. কোড Share Get link Facebook X Pinterest Email Other Apps Labels UVa Share Get link Facebook X Pinterest Email Other Apps Comments
How can we fiend a "LEAP YEAR" in C program May 13, 2014 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include<stdio.h> void main() { int year; while (scanf( " %d " , & year) != EOF) { if (year % 4 == 0 && (year % 400 == 0 || year % 100 != 0 )) printf( "LEAP YEAR" ); else printf( "NOT LEAP YEAR" ); } } Read more
Finding digit number of a number May 16, 2014 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 #include<stdio.h> int main() { long long int a,b, sum ,temp,count = 0 ,count_1 = 1 ; while ( (scanf( "%lld %lld" , & a, & b)) != EOF) { if (a <= 1000000 && b <= 1000000 ) { sum = a + b; temp = sum ; while (temp != 0 ) { sum /= 10 ; temp = sum ; count ++ ; } printf( "%lld \n " ,count); } count = 0 ; if (count_1 > 200 ) break ; count_1 ++ ; } return 0 ; } Read more
Comments
Post a Comment