## UVA Problem 12895 Solution -Armstrong Number

#include <bits/stdc++.h> using namespace std; int main() { int num,tc,sum,j; vector<int>v; cin>>tc; while(tc–) { cin>>num; v.push_back(num); int tempo=num; int i=0; while(tempo) { v[i]=tempo%10; tempo/=10; i++; } for(sum = j =0;j<i;j++) { sum = sum + pow(v[j],i); } if(sum…

## UVA-Solutions 11677 (Alarm Clock)

#include <bits/stdc++.h> using namespace std; int main() { int h1,m1,h2,m2,hr,mr,tr; while(cin>>h1>>m1>>h2>>m2) { if(h1==0 && m1==0 && h2==0 && m2==0) break; hr=h2-h1; mr=m2-m1; tr=(hr*60)+mr; if(tr<0) { tr+=24*60; } cout<<tr<<endl; } return 0; }

## UVA Problem 10773 – Back to Intermediate Math

#include <bits/stdc++.h> using namespace std; int main() { double d,u,v,t1,t2; int count,n; cin>>n; count=1; while(n–) { cin>>d>>v>>u; if(u==0 ||v==0 ||u<=v) { printf(“Case %d: can’t determine\n”,count); continue; } t1=d/u; t2=d/sqrt(u*u-v*v); printf(“Case %d: %.3lf\n”,count,t2-t1); count++; } return 0; }

## UVA 11462 (Age sort) Solution

//UVA Problem 11462 Solution /** * @Author : Jesmin Akther */ #include <stdio.h> long int n, array[2000005], c, d, t; int main() { while(scanf(“%ld”, &n)==1 ) { if(n==0) break; for (c = 0; c < n; c++) { scanf(“%ld”, &array[c]);…