已知一个函数:f(a)=a²+2a+4,要求输入a的值,请计算出函数值f(a)并输出
#include <stdio.h> int main() { int a,f; scanf("%d",&a); f=a*a+2*a+4; printf("%d",f); return 0; }