# Codeabbey Volume Beginners Solutions 1-6, 15

#### Intro:

These are some of the basic programming problems. Also these are the very fundamentals to start solving more complex problems. I will include more problems if I have time.

These problems are from codeabbey volume beginners level and problems 1 to 6 and number 15.

```/*
* Author: Quickgrid ( Asif Ahmed )
* Site: https://quickgrid.wordpress.com
*/
#include<iostream>
using namespace std;
int main(){
long long a,b;
while(cin >> a >> b){
cout << a+b << "\n";
}
return 0;
}
```

```/*
* Author: Quickgrid ( Asif Ahmed )
* Site: https://quickgrid.wordpress.com
*/
#include<stdio.h>
int main(){
register unsigned int n;
while(scanf("%u", &n)==1){
long long sum = 0;
while(n--){
long long ago;
scanf("%lld", &ago);
sum += ago;
}
printf("%lld\n", sum);
}
return 0;
}
```

```/*
* Author: Quickgrid ( Asif Ahmed )
* Site: https://quickgrid.wordpress.com
*/
#include<stdio.h>
int main(){
register unsigned int n;
while(scanf("%u", &n)==1){
while(n--){
long long a,b;
scanf("%lld%lld", &a, &b);
printf("%lld", a+b);
if(n) printf(" ");
}
printf("\n");
}
return 0;
}
```

```/*
* Author: Quickgrid ( Asif Ahmed )
* Site: https://quickgrid.wordpress.com
*/
#include<stdio.h>
int main(){
register unsigned int n;
while(scanf("%u", &n)==1){
while(n--){
long long a,b;
scanf("%lld%lld", &a, &b);
a>b?printf("%lld", b):printf("%lld", a);
if(n) printf(" ");
}
printf("\n");
}
return 0;
}
```

```/*
* Author: Quickgrid ( Asif Ahmed )
* Site: https://quickgrid.wordpress.com
*/
#include<stdio.h>
inline long long min(long long a, long long b){
return (a>b?b:a);
}
int main(){
register unsigned int n;
while(scanf("%u", &n)==1){
while(n--){
long long a,b,c;
scanf("%lld%lld%lld", &a, &b, &c);
printf("%lld", min(min(a,b),c));
if(n) printf(" ");
}
printf("\n");
}
return 0;
}
```

```/*
* Author: Quickgrid ( Asif Ahmed )
* Site: https://quickgrid.wordpress.com
*/
#include<stdio.h>
int main(){
register unsigned int i = 0;
long long max, min, n;
while(scanf("%lld", &n)==1){
if(i){
if(n > max){
max = n;
}
if(n < min){
min = n;
}
}else{
max = n;
min = n;
++i;
}
}
printf("%lld %lld\n", max, min);
return 0;
}
```

```/*
* Author: Quickgrid ( Asif Ahmed )
* Site: https://quickgrid.wordpress.com
*/
#include<stdio.h>
#include<math.h>
int main(){
register unsigned int n;
long long a, b;
while(scanf("%u", &n)==1){
while(n--){
scanf("%lld%lld", &a, &b);
printf("%lld", (long long) round(a/(double)b));
if(n) printf(" ");
}
printf("\n");
}
return 0;
}
```