Write a script to perform the product of 3 numbers entered by the user.
Plz answer correct i will make you brainlist
Answers
Answered by
1
Answer:
C++:
float a, b, c;
cin>>a>>b>>c;
cout<<a*b*c<<endl;
(This is just the part in the main(), no other extra parts included like the #include <iostream> or int main declaration)
In Python:
var a, b, c
input(a,b,c)
print(a*b*c)
(I have not revised my Python concepts so please correct me if I'm wrong!)
In C:
float a,b,c;
a = scanf();
b = scanf();
c = scanf();
printf(a*b*c);
(I have not revised my C concepts so please correct me if I'm wrong!)
In simple English:
Declare variables A, B and C
Get A B C values from user input
Multiply A with B and C
Print result from line 3 to screen for idiotic user who can't multiply the numbers on his own (Just for gags and laughs.)
No offense intended.
Answered by
0
class name
{
public static void main(int a, int b, int c)
{
int p;
p = a * b * c;
System.out.println(“Product is ” + );
}
}
{
public static void main(int a, int b, int c)
{
int p;
p = a * b * c;
System.out.println(“Product is ” + );
}
}
Similar questions