Computer Science, asked by swithiks, 2 months ago

write a c program to display the equation of a line in a form a x + b y =c for a,b,c value of your choice . display your name on console along with the result ​

Answers

Answered by lavanya3602
3

program on c language:

#include<stdio.h>

int main()

{

 int a,b,c;

 char d[20];

 printf("enter a,b,c and your name values:");

 scanf("%d %d %d",&a,&b,&c);

 puts(d);

 printf("\n %s equation is %d x + %d y = %d",d,a,b,c);

}

expected output:

enter a,b,c and your name values: 2 3 4 abc

abc equation is 2x+3y=4

program on python:

a,b,c = [int(x) for x in (input("enter a values of a,b and c: ").split(" "))]

s = input("enter your name: ")

print(s,"equation is", a,"x +",b,"y =",c)

expected output:

enter a values of a,b and c: 2 3 4

enter your name: abc

abc equation is 2x+3y = 4

Similar questions