Skip to content

Commit

Permalink
Merge pull request #3 from GuilOliveira/main
Browse files Browse the repository at this point in the history
1010 new submission
  • Loading branch information
gabrielduete authored Oct 23, 2022
2 parents 7569dcf + f4929f4 commit 2bc6df5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions iniciante/guiloliveira/1010.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var lines = input.split('\n');

var x = lines.shift().split(' ');

var y = lines.shift().split(' ');

var Peca1 = parseInt(x[0]); var quant1 = parseInt(x[1]); var valorUni1 = parseFloat(x[2]);

var Peca2 = parseInt(y[0]); var quant2 = parseInt(y[1]); var valorUni2 = parseFloat(y[2]);

console.log("VALOR A PAGAR: R$ " + parseFloat((quant1*valorUni1)+(quant2*valorUni2)).toFixed(2));

0 comments on commit 2bc6df5

Please sign in to comment.