URI 1542 Solution Reading Books - in C++ | Ad Hoc
URI Online Judge Solution 1542
URI Main Problem Link - Reading Books https://www.urionlinejudge.com.br/judge/en/problems/view/1542
Problem Name: URI Problem Reading Books
Problem Number : URI Problem 1542 Solution
Online Judge : URI Online Judge Solution
Level: Ad Hoc
Solution Language : C plus plus
URI Solution 1542 Code in CPP:
#include <iostream> using namespace std; int main() { int q, d, p, pag; while(cin >> q && q != 0) { cin >> d >> p; pag = (p * d * q)/(p - q); if(pag > 1){ cout << pag << " paginas" << endl; }else{ cout << pag << " pagina" << endl; } } return 0; }
No comments:
Write commentsTo know more about the problem, give us your valuable commment. We'll try to help you. Thanks