#include <stdio.h>
#include <stdlib.h>
int main()
{
int n=5;
printf("%d\n",func(n));
return 0;
}
func (int n)
{ return(n+sqr(n-2)+cube(n-3));}
sqr (int x)
{ return (x*x); }
cube(int x)
{ return (x*x*x);}
output::
22
#include <stdlib.h>
int main()
{
int n=5;
printf("%d\n",func(n));
return 0;
}
func (int n)
{ return(n+sqr(n-2)+cube(n-3));}
sqr (int x)
{ return (x*x); }
cube(int x)
{ return (x*x*x);}
output::
22
No comments:
Post a Comment