How to perform simple expression in c++

Program:-Program that solves the following expression

a*b/(-c*31%13)*d(where their values are a=10,b=20,c=15 and d=8.

#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c,d,Result;
a=10;
b=20;
c=15;
d=8;
Result=a*b/(-c*31%13)*d;
cout<<“Result of expression is:”<<Result;
getch();
}

Output:

Result of expression is:-160

Related Posts:

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>