Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cs-142:adding-a-missing-area-code [2015/05/11 20:50]
cs142ta created
cs-142:adding-a-missing-area-code [2015/05/12 19:08] (current)
cs142ta
Line 1: Line 1:
 +
 +
 =Adding a missing area code= =Adding a missing area code=
 ==Problem Statement== ==Problem Statement==
Line 8: Line 10:
 ==Solution== ==Solution==
 <code cpp> <code cpp>
 +/*
 +Test Case 1:
 +Input: 888-8888 (w/o area code example)
 +Expected Output: 801-888-8888
 +Actual Output: 801-888-8888
 +
 +Test Case 2:
 +Input: 541-888-8888 (w/ area code example)
 +Expected Output: 541-888-8888
 +Actual Output: 541-888-8888
 +
 +Test Case 3:
 +Input: 8888888 (malformatted input)
 +Expected Output: 8888888 (expected malformatted output)
 +Actual Output: 8888888
 +*/
 #include <​iostream>​ #include <​iostream>​
 #include <​string>​ #include <​string>​
cs-142/adding-a-missing-area-code.txt ยท Last modified: 2015/05/12 19:08 by cs142ta
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0