UVA Solution 445 – Marvelous Mazes – Solution in C, C++

UVA Online Judge Solution 445 – Marvelous Mazes | Volume 4
UVA Problem Link – 445 – Marvelous Mazes  – https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=6&page=show_problem&problem=386

Problem Name: 445 – Marvelous Mazes
Problem Number : UVA – 445 – Marvelous Mazes
Online Judge : UVA Online Judge Solution
Volume: 4
Solution Language : C,C plus plus

UVA Online Judge Solution, UVA OJ Solution list, UVA Problems Solution, UVA solver, UVA all problem solution list

UVA Solution 445 – Marvelous Mazes Code in C/CPP:

#include <stdio.h>

int
main() {
char
str[200];
while
(gets(str)) {
int
num = 0, i, j;
for
(i = 0; str[i]; i++) {
switch
(str[i]) {
case
'0' ... '9': num += str[i]-'0';break;
case
'b':
for
(j = 0; j < num; j++)
putchar(' ');
num = 0;
break
;
case
'!':
puts("");
break
;
default
:
for
(j = 0; j < num; j++)
putchar(str[i]);
num = 0;
}
}

puts("");
}

return
0;
}

Tags: UVA Online Judge Solution, UVA OJ Solution list, UVA Problems Solution, UVA solver, UVA all problem solution list, UVA Marvelous Mazes code in C, UVA 445 code in C++, UVA Marvelous Mazes solution in C, UVA 445 solution

By Maniruzzaman Akash

Maniruzzaman Akash is a freelance web developer with most popular Laravel PHP frameork and Vue JS

Leave a Reply

Your email address will not be published. Required fields are marked *