
256 N.W.2d 887 (1977)
AMERICAN PROPERTY SERVICES, INC., Plaintiff and Respondent,
v.
Vern BARRINGER, Defendant and Appellant.
No. 11840.
Supreme Court of South Dakota.
August 17, 1977.
Rehearing Denied September 19, 1977.
*888 Joseph M. Butler and Allen G. Nelson of Bangs, McCullen, Butler, Foye & Simmons, Rapid City, for plaintiff and respondent.
Robert L. Varilek, Rapid City, for defendant and appellant.
ZASTROW, Justice (on reassignment).
Defendant appeals from a judgment entered in favor of plaintiff for a commission for the sale of certain real estate in Rapid City, South Dakota. We affirm.
On June 23, 1973, plaintiff and defendant entered into a real estate listing agreement, the pertinent terms of which were as follows:
"In consideration of your agreement to use your efforts to find a purchaser, and to list with the members of the RAPID CITY MULTIPLE LISTING SERVICE, the real property described below, I hereby grant to you for the above term the *889 exclusive irrevocable right and privilege to sell the following property * * *.[1]
"If during said period, the property is sold by you or me or anyone else; or if you, or any member of the RAPID CITY MULTIPLE LISTING SERVICE produce a purchaser ready, willing and able to purchase the property; or if within three months after the expiration of said period a sale is made to any person to whom the property has been shown by you or me or any said member of the MULTIPLE LISTING SERVICE, I agree to pay you a commission of 6% of the sale price. * * *"
This listing agreement expired by its own terms on August 23, 1973, and on September 7, 1973, defendant signed an authorization extending the listing agreement to December 31, 1973.
Plaintiff did not produce a purchaser for the property covered by the listing agreement, and on October 1, 1973, defendant entered into a contract for the sale of the property to a purchaser with whom he had negotiated directly. In April of 1974, plaintiff commenced an action to recover the commission based upon the price at which defendant had agreed to sell the property to the third party.
The defendant's answer stated a general denial,[2] and from his pretrial brief it appears that his original defense was based upon an alleged contemporaneous oral agreement that the renewal of the listing agreement would exclude B & C, Inc., the eventual purchaser of the property covered by the listing agreement. The trial judge ruled that the parol evidence rule would bar the introduction of any evidence of such an oral agreement. The defendant did not assign that ruling as error, nor does he raise it on appeal.
The matter was then submitted to the trial court entirely upon depositions and trial briefs. The trial court found generally for the plaintiff and against the defendant. The issue presented at the trial and in defendant's appellate brief is stated in this fashion: "Must a broker, in order to recover compensation called for by its contract of employment, procure a person who is ready, willing and able to purchase on terms proposed by his principal?" In support of his position, the defendant cites a number of our decisions, i. e., Ericson v. Ebsen, 52 S.D. 97, 216 N.W. 860; Dobson v. Wolff, 74 S.D. 493, 54 N.W.2d 469; Rossum v. Wick, 74 S.D. 554, 56 N.W.2d 770; Mehlberg v. Redlin, 77 S.D. 586, 96 N.W.2d 399; Larson v. Syverson, S.D. 31, 166 N.W.2d 424. See also, Richardson v. Kelley Land and Cattle Company, 8 Cir., 504 F.2d 30. Defendant's reliance upon these cases is misplaced, however, because the listing agreement in question clearly provided that if the property was sold during the period covered by the agreement, defendant would be liable to plaintiff for a commission whether or not the purchaser was procured by plaintiff.
In presenting his argument in support of that issue, the defendant stated:
"In this case, it is admitted by Plaintiff[3] that neither they nor any other realtor sold the real estate, never showed the property, never presented any offers, never knew or met the ultimate purchasers, the property was never sold upon the listed terms during the life of the listing, the property was not sold during the listed time; in short, nothing was done upon which to predicate an earned fee. It is in this regard that the evidence clearly preponderates that the Trial Court's Findings and Conclusions are not supported."
*890 The defendant's assignments of error contain a similar allegation. Although he cites no authority therefor, it appears that the defendant attempts to argue that there was a failure of consideration by the plaintiff's failure to use reasonable and diligent efforts to obtain a purchaser.[4]
SDCL 15-6-8(c) lists those defenses which must be set out affirmatively in the pleadings:
"In pleading to a preceding pleading, a party shall set forth affirmatively accord and satisfaction, arbitration and award, assumption of risk, contributory negligence, discharge in bankruptcy, duress, estoppel, failure of consideration, fraud, illegality, injury by fellow servant, laches, license, payment, release, res judicata, statute of frauds, statute of limitations, waiver and any other matter constituting an avoidance or affirmative defense. * * *" (emphasis supplied)
The defense of failure of consideration is not put in issue by a general denial to the complaint but must be affirmatively pleaded. Kent Feeds, Inc. v. Stahl, 1976, S.D., 238 N.W.2d 483; Seaboard Surety Company v. Harbison, 1962, 7 Cir., 304 F.2d 247; Pacific Indemnity Company v. Wyrembek, 1960, D.C.Wis., 183 F.Supp. 252. See also 12 C.J.S. Brokers § 108. If an affirmative defense is not pleaded, it is waived to the extent that the party who should have pleaded it may not introduce any evidence in support thereof. 2A Moore's Federal Practice ¶ 8.27[3]; Gajewski v. Bratcher, 1974, N.D., 221 N.W.2d 614; Durr v. Hardesty, 1956, 76 S.D. 232, 76 N.W.2d 393.
There are two exceptions to the general rule that affirmative defenses not pleaded are waived. It will not be waived if an amendment to set forth the affirmative defense is properly made. See SDCL 15-6-15(a); Federal Savings & Loan Ins. Corporation v. Szarabajka, D.C.Ill., 330 F.Supp. 1202; 2A Moore's Federal Practice ¶ 8.27[3] at 1853.
The second exception to the rule is found in SDCL 15-6-15(b):
"When issues not raised by the pleadings are tried by express or implied consent of the parties, they shall be treated in all respects as if they had been raised in the pleadings. Such amendment of the pleadings as may be necessary to cause them to conform to the evidence and to raise these issues may be made upon motion of any party at any time, even after judgment; but failure so to amend does not affect the result of the trial of these issues. If evidence is objected to at the trial on the ground that it is not within the issues made by the pleadings, the court may allow the pleadings to be amended and shall do so freely when the presentation of the merits of the action will be subserved thereby and the objecting party fails to satisfy the court that the admission of such evidence would prejudice him in maintaining his action or defense upon the merits. The court may grant a continuance to enable the objecting party to meet such evidence." (emphasis supplied)
The fact that an affirmative defense has not been formally pleaded or an amendment made is immaterial if the issue was tried by express or implied consent. Sabbagh v. Prof. & Bus. Men's Life Ins. Co., 1962, 79 S.D. 615, 116 N.W.2d 513; Durr v. Hardesty, supra; Fredrick v. Christensen, 73 S.D. 130, 39 N.W.2d 529; Knapp v. Brett, 54 S.D. 1, 222 N.W. 297; City of Mitchell v. Dakota Central Telephone Co., 27 S.D. 509, 131 N.W. 1090. In Mitchell v. Kickapoo Prairie Broadcasting Company, 1960, D.C. Mo., 182 F.Supp. 578, the court, in ruling on plaintiff's objection to the consideration of an affirmative defense, stated:
"It undoubtedly is true that this defensive matter normally is required to be pleaded and proved by defendants. However, counsel for defendants announced in opening statements as to Nova Nash that *891 the defense would be that he was an exempt employee. Extensive evidence both direct and on cross-examination was introduced in the trial without objection. Within long established rules of procedure in this and other courts, plaintiff must be deemed to have waived the objection. The pleadings are considered amended to conform to the proof. Rule 15(b), F.R.Civ.P., 28 U.S.C.A."
The test for allowing an adjudication of an issue under FRCP 15(b) and SDCL 15-6-15(b) tried by implied consent is whether the opposing party will be prejudiced by the implied amendment, i. e., did he have a fair opportunity to litigate the issue, and could he have offered any additional evidence if the case had been tried on the different issue.[5] 3 Moore's Federal Practice ¶ 15.13[2] at 993; Lomartira v. American Automobile Insurance Co., 1967, 2 Cir., 371 F.2d 550; Deitz v. Bowman, 1975, D.C.S.D., 403 F.Supp. 1111. Where there has not been a fair opportunity for a party to be heard on the issue and/or additional evidence could have been offered, any implied amendment would be prejudicial and no trial by implied consent exists.
The settled record in this matter reveals several determining facts. The defendant's answer was a general denial and was never amended to include any affirmative defenses, nor was the issue tried by the express consent of the parties. Defendant does make some references in the depositions and in his trial brief to the inadequacy of plaintiff's efforts to find a purchaser; however, those references are invariably made in relation to defendant's argument that the plaintiff was not a procuring cause of the sale. Nothing in the court's findings of fact and conclusions of law, nor in defendant's objections thereto, nor in defendant's proposed findings raises the issue of failure of consideration.
Applying the previously stated test, it would be very prejudicial to the plaintiff to construe defendant's passing references in the depositions and trial brief to plaintiff's inadequate efforts as a trial by implied consent of the defense of failure of consideration.
In those cases where pleadings are considered amended to conform to the evidence (SDCL 15-6-15(b)), the consent is easily implied. For example, in Mitchell v. Kickapoo Prairie Broadcasting Company, supra, counsel for defendant announced the affirmative defense in opening statements, and extensive evidence both direct and on cross-examination was introduced in the trial without objection. The affirmative defense in Deitz v. Bowman, supra, was suggested in defendant's answer, discussed at the pretrial conference and fully briefed by the plaintiff. None of those indicia of trial by implied consent are found in this case. There is no extensive evidence, and the issue was not discussed or briefed by either *892 party at the trial level. In fact, it is questionable whether the defendant directly raises the issue on appeal. The many authorities and arguments presented by Justice Wollman in his dissent represent considerable research not found in the defendant's appeal brief. We conclude that the defendant has waived the defense of failure of consideration by not pleading it affirmatively in his answer, and that the issue was not tried by the implied consent of the parties.
Finally, the defendant questions whether the trial judge correctly awarded prejudgment interest when the complaint did not include a specific request for such relief. The complaint demanded "judgment against the defendant in the sum of Thirty Thousand Dollars ($30,000.00) and for such other and further relief as the Court deems appropriate."
SDCL 15-6-8(a) provides that "[a] pleading which sets forth a claim for relief * * shall contain * * * (2) a demand for judgment for the relief to which he deems himself entitled." Good pleading practice would normally dictate that a demand for prejudgment interest be made. However, just as affirmative defenses not pleaded may be litigated under SDCL 15-6-15(b), "every [nondefault] final judgment shall grant the relief to which the party in whose favor it is rendered is entitled, even if the party has not demanded such relief in his pleadings," under SDCL 15-6-54(c). Walkon Carpet Corporation v. Klapprodt, 1975, S.D., 231 N.W.2d 370; Bigley v. Brandau, 1973, 57 Wis.2d 198, 203 N.W.2d 735. However, the relief to be granted under SDCL 15-6-54(c) is not unlimited, and such relief must be based upon the facts alleged in the pleadings and justified by the proof at trial. 6 Moore's Federal Practice ¶ 54.62 at 1265, 1271; Wright & Miller, Federal Practice and Procedure: Civil § 2662; see Shepherd v. Hub Lumber Co., 1975, 273 Or. 331, 541 P.2d 439. Therefore, if under the facts as established by the evidence, a claimant is entitled to prejudgment interest, the trial court should grant such relief even though it was not contained in the prayer for relief. Roth v. Fabrikant Bros., 1949, 2 Cir., 175 F.2d 665; Gardner v. Mid-Continent Grain Co., 1948, 8 Cir., 168 F.2d 819; Sanders v. City of Los Angeles, 1970, 3 Cal.3d 252, 90 Cal.Rptr. 169, 475 P.2d 201. See also, 47 C.J.S. Interest § 74.
Under SDCL 21-1-11, prejudgment interest may be allowed where (1) the damages are certain or are capable of being made certain by calculation and (2) the right to recover such damages vested upon a particular day. Peter Kiewit Sons' Co. v. Summit Construction Co., 1969, 8 Cir., 422 F.2d 242.
Applying the requirements of SDCL 21-1-11 to the facts in this case, we find (1) that the plaintiff sought to recover damages which were capable of being made certain by calculation, i. e., a 6% sales commission upon the sale price of the property covered by the exclusive listing agreement (6% × $350,000 = $21,000); and (2) that the right to recover such damages vested in the plaintiff on October 1, 1973, the date the binding contract was signed by the defendant and the purchaser.
The judgment is affirmed.
PORTER and MORGAN, JJ., concur.
DUNN, C. J., and WOLLMAN, J., dissent.
WOLLMAN, Justice (dissenting).
In view of the rather casual manner in which this case was prepared and submitted by both parties, I would hold that defendant's adverse examination of plaintiff's witnesses, together with defendant's trial brief, sufficiently raised the issue of failure of consideration so that that issue can be said to have been tried by implied consent of the parties. SDCL 15-6-15(b).
The question, then, is whether plaintiff is entitled to recover under the terms of the listing agreement in the absence of proof that it had performed some substantial services under the terms of the agreement. I would hold that it cannot.
In the case of Ladd v. Teichman, 359 Mich. 587, 103 N.W.2d 338, the Supreme Court of Michigan stated that:

*893 "Thus it appears that where a contract to sell real estate contains a provision for exclusive sale rights and a reasonable time limit, and the broker is able to show substantial performance of the duties imposed upon him by the contract (even though he does not produce a buyer), when the owner makes the sale within the contract dates, the contract is held to be enforceable and the broker entitled to his commission." 359 Mich. at 595, 103 N.W.2d at 343.
In the case of Huchting v. Rahn, 179 Wis. 50, 190 N.W. 847, the listing agreement provided in part that, "I agree to pay a commission to you of five per cent of the sale price of the property, if sold or exchanged before this agreement is terminated, regardless of who negotiates the sale.. . ." In holding that the evidence supported the jury's finding that the real estate broker had not exercised the proper degree of care, diligence, skill and good faith in the execution of his agency, the Supreme Court of Wisconsin stated:
"In this connection is also to be noted the general rule requiring all agents to exercise reasonable care, skill, and diligence in the performance of their obligations as agents. Clearly under the authorities referred to, an agent under an exclusive agency contract cannot sit idly by, doing nothing, or substantially nothing, during the period of his agency, and claim a commission where the sale is effected through the efforts of the owner. The contract in the instant case covers a period in excess of six months. In executing this contract the owner extends a valuable right to the agent, under and pursuant to which he is afforded an opportunity to earn a substantial compensation in the form of commissions." 179 Wis. at 54, 190 N.W. at 848.
This holding was followed by the Wisconsin Supreme Court in Genske v. Christensen, 189 Wis. 520, 208 N.W. 467, and in Starszak v. Kochanik, 199 Wis. 473, 227 N.W. 21, and was recognized by the Iowa Supreme Court as setting forth the proper test of performance by a broker. Kuehnle v. Schromen, 258 Iowa 989, 140 N.W.2d 188.
In Covino v. Pfeffer, 160 Conn. 212, 276 A.2d 895, the Supreme Court of Connecticut stated that:
". . . During the life of an exclusive sale contract, an agreement between the owner and the ultimate purchaser to sell and buy, whether or not specifically enforceable, gives rise to a cause of action on the part of an exclusive broker who uses reasonable efforts to sell the property. . . ." 160 Conn. at 215, 276 A.2d at 897.
The rule in California appears to be similar to those in the cases set forth above, for in Charles V. Webster Real Estate v. Rickard, 21 Cal.App.3d 612, 98 Cal.Rptr. 559, the Court of Appeal for the Fifth District stated:
"In Kimmell v. Skelly, 130 Cal. 555, 559, 62 P. 1067, it is held that the consideration for the covenant of the owner to pay a commission upon her own sale during the existence of the listing was the performance of services by the broker in attempting to find a buyer. Where the broker has used diligence, he is entitled to compensation even though he was not the procuring cause of the sale. . . ." (citations omitted) 21 Cal.App.3d at 615, 98 Cal.Rptr. at 561.
More recently, the Supreme Court of North Dakota construed an exclusive right-to-sell listing agreement that provided that the broker agreed to use diligence in procuring a purchaser, and held that:
". . . The listing agreement provided that the commission would be due whether the property was sold by Bowman Real Estate, another broker, or by the Krugers themselves. This type of provision, however, has not been interpreted to entitle the broker to a commission under all circumstances. Rather, there must be some proof of consideration for the contract by performance of services by the real estate agent. The broker must show substantial performance of the duties imposed on him by the contract, even if he does not produce a buyer to be eligible for a commission. *894 Ladd v. Teichman, 359 Mich. 587, 103 N.W.2d 338 (1960) . . . To recover a commission even under an exclusive right-to-sell provision, clear evidence of expenditure of time, effort, or money by the broker must be presented. Where such a showing is absent the listing agreement has the characteristics of a unilateral contract, which is not binding for lack of sufficient consideration." Kruger v. Soreide, 246 N.W.2d 764, 773.
The court went on to hold that because the record revealed at best only a perfunctory effort by the brokers to sell the property during the renewal period, they were not entitled to recover the commission because of the absence of substantial performance under the agreement.
The foregoing cases set forth the rule that should be applied in interpreting the provisions of the listing agreement in question. Granted that the listing agreement does not provide that the plaintiff would use its "best efforts" or "diligent efforts" to find a purchaser, I believe that such a promise on the part of plaintiff is implied, for if it were not then plaintiff could sit idly by and do nothing, or substantially nothing, and yet be entitled to a commission as a result of defendant's diligent efforts to secure a purchaser on his own. Huchting v. Rahn, supra.
When measured against this test of performance, plaintiff's efforts are wanting. As noted in the majority opinion, the evidence was submitted to the trial court by way of depositions, and thus it is reviewed on appeal as though presented to us for the first time and is not subject to the "clearly erroneous rule" of SDCL 15-6-52(a). Geo. A. Clark & Son, Inc. v. Nold, 85 S.D. 468, 185 N.W.2d 677. Plaintiff chose not to submit any evidence whatsoever with respect to any matters raised by the pleadings, but instead submitted the case to the trial court on the basis of defendant's pretrial adverse examination of plaintiff's president and one of its agents. Plaintiff's president testified that he did not remember whether the property was listed with the Rapid City Multiple Listing Service. He testified that he had showed the premises by driving by the property with "people," although he could not recall the names of those persons and did not indicate when this showing occurred. He testified that he had advertised the property in the Rapid City Journal, although he did not indicate how many times or in what type of advertisements the property was advertised.[*] This witness was unable to recall how much his company had spent in advertising the property, even to the point of not knowing whether it was more or less than $100.00. The only testimony that plaintiff's agent was able to offer was that he had made some long-distance telephone calls from the office, but here again the witness did not elaborate on when these calls were made or to whom.
What the North Dakota Supreme Court said in the Kruger case, supra, is applicable to the instant case, in that at best the record reveals a perfunctory effort by plaintiff to sell the property. Accordingly, I would reverse the judgment.
I am authorized to state that Chief Justice DUNN joins in this dissent.
NOTES
[1]  The listing agreement is, by its terms, a bilateral contract, the defendant granting an "exclusive right to sell" in return for the plaintiff's promise of reasonable efforts to secure a purchaser. Williston on Contracts, Third Edition, Section 1287A; 12 Am.Jur.2d, Brokers, § 231.
[2]  "The Defendant answers to the Complaint as follows:

I.
"The Defendant denies each and every allegation contained in the Complaint of the Plaintiff.
"Wherefore Defendant prays for judgment against the Plaintiff and his costs and disbursements herein and the Plaintiff's Complaint be dismissed."
[3]  The plaintiff denied this in its brief.
[4]  Inasmuch as the listing agreement was a bilateral contract (see footnote 1), the alleged lack of reasonable and diligent efforts was a failure of consideration rather than a lack of consideration.
[5]  The dissent suggests that the plaintiff failed to show the use of reasonable and diligent efforts on the part of its agents and employees. However, since failure of consideration is an affirmative defense, the burden was upon the defendant to raise the issue. Although the plaintiff's president did state that he could not remember the amount and cost of the advertising, he did indicate that its attorney had the information in his brief case and that the defendant did not request that material. Likewise, the number of telephone calls, expenses, and prospective purchasers (by the plaintiff and other members of the Multiple Listing Service) were information which was available to the defendant through proper discovery procedures, which were not used, even though the president of the plaintiff indicated that such information would be ascertainable from its records.

It is also unclear whether the defendant argues the failure of consideration for the first listing agreement or the renewal. If he refers to the original listing, then there would have been the possible issue of estoppel for the plaintiff to raise; if he refers to the renewal, the defendant's prevention of plaintiff's performance of diligent efforts by the sale, without notice, sixty days before the expiration at a price some $150,000 less than the listed price would have been an issue. 12 C.J.S. Brokers §§ 83, 94.
The issue of whether the listing agreement is a bilateral or unilateral contract (see footnote 1), an exclusive agency or an exclusive right to sell (12 C.J.S. Brokers § 94; 12 Am.Jur.2d, Brokers, § 231) would have been important issues to be determined before the resolution of the failure of consideration question.
[*]  Plaintiff contends in its brief that the property was advertised on no less than ten separate occasions in the Rapid City Journal, and cites pages in the settled record to support this assertion. Unfortunately, there is absolutely nothing in the cited pages of the settled record to substantiate plaintiff's contention.
