Do Not Tick option "Request desktop site" anymore while using mobile device.
Code:
Choose any one of the following 3:
Shortest Version[Now Verified]:
Fail Safe Version[Verified]:
(in case the book title/Author's Name has spaces in it
{because in that case simple use of cin will not work since, in a way, the default delimiters are whitespaces so we need to change it to '\n' with getline() }) {as it turns out, the names do not contain spaces so "shortest code" will work this is no longer "recommended" or needed}.
Long version[Verified]
Input:
Type of material (0/1)isbn number
title
author
year of publication
number of pages/duration
Output:
isbn numbertitle
cost
Processing:
for books:cost=pages
for CD:
cost=2*duration
Psuedocode:
start
input type,isbn,title,author,year
if type=0
input pages
let cost = pages
else
input duration
let cost = 2*duration
end if
output isbn,title,cost
stop
wot about skill smugglers code.. that'll work if there are spaces in the name...
ReplyDeleteum..assuming that that's a question, no, it cannot work if there are spaces or tabs in the input.
ReplyDeleteplz upload also the copy version
ReplyDeleteupload as text n not as png!!
ReplyDeleteUpload as text please
ReplyDelete