#include<\/a> <iostream><\/p>\nusing namespace std;<\/p>\n
<\/p>\n
int sum(int a, int b) {<\/p>\n
return a+b;<\/p>\n
}<\/p>\n
int diff(int a, int b) {<\/p>\n
return a-b;<\/p>\n
}<\/p>\n
int product(int a, int b) {<\/p>\n
return a*b;<\/p>\n
}<\/p>\n
int div(int a, int b) {<\/p>\n
return a\/b;<\/p>\n
}<\/p>\n
int remainder(int a, int b) {<\/p>\n
return a%b;<\/p>\n
}<\/p>\n
int main(){<\/p>\n
int a, b;<\/p>\n
cout <<“enter the first value”<<endl;<\/p>\n
cin>> (a);<\/p>\n
cout <<“enter the second value”<<endl;<\/p>\n
cin>> (b);<\/p>\n
<\/p>\n
cout <<“the sum of the numbers is “<<sum (a,b)<< endl;<\/p>\n
cout <<“the difference of the numbers is “<<diff (a, b)<< endl;<\/p>\n
cout <<“the product of the numbers is “<<product (a, b)<< endl;<\/p>\n
cout <<“the integer divition of the numbers is “<<div (a, b)<< endl;<\/p>\n
cout <<“the remainder of the numbers is “<<remainder (a, b)<< endl;<\/p>\n
<\/p>\n
return 0;<\/p>\n
}
<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"
#WSQ08 #functions #funwithnumbers2.0 here is my code for wsq08 #include <iostream>using namespace std; int sum(int a, int b) {return a+b;}int diff(int a, int b) {return a-b;}int product(int a, int b) {return a*b;}int div(i… Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":43,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,26],"tags":[238,239,95,233],"class_list":["post-4871","post","type-post","status-publish","format-standard","hentry","category-blogs","category-syndicated","category-tc1017blogs","tag-functions","tag-funwithnumbers2","tag-include","tag-wsq08"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/4871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=4871"}],"version-history":[{"count":7,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/4871\/revisions"}],"predecessor-version":[{"id":19581,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/4871\/revisions\/19581"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=4871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=4871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=4871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}