View Code of Problem 69

#include<stdio.h>
int y1(int x,int y)
{
	y=x;
	printf("%d",y);
}
int y2(int x,int y)
{
	y=3*x-11;
	printf("%d",y);
}
int y3(int x,int y)
{
	y=2*x-1;
	printf("%d",y);
}
	 int main()
{
	int x,y;
	scanf("%d",&x);
	if(x<1)
	y1(x,y);
	else if(x>=10)
	y2(x,y);
	else
	y3(x,y);
	return 0;
}

Double click to view unformatted code.


Back to problem 69