#include <stdio.h>
int main()
{
int a, b,i,ans;
printf("Enter a and b\t");
scanf("%d %d",&a,&b);
ans=1;
for(i=0;i<b;i++)
ans=ans*a;
printf("%d to the power %d = %d",a,b,ans);
return 0;
}
a XOR b is a^b in C language
int pow (int a, int b) { if (b==0) return 1; else return a*pow(a,b-1); }
(defun max3 (a b c) (cond ((> a b) (cond ((> a c) a) (t c))) ((> b c) b) (t c) ) )
--THE SUM OF TWO NUMBERS: declare a number(2); b number(2); c number(2); begin a:=&a; b:=&b; c:=a+b; dbms_output.put_line(a ' + 'b' = 'c); end;
{ int a,b; { a=a^2; } { b=b^2; } { c=a^2+b^2+2*a*b; print f("%d%d%d",&c); get ch(); } ]
largest of a, b, c :a > b ? a > c ? a : c : b > c ? b : c
a XOR b is a^b in C language
int pow (int a, int b) { if (b==0) return 1; else return a*pow(a,b-1); }
(defun max3 (a b c) (cond ((> a b) (cond ((> a c) a) (t c))) ((> b c) b) (t c) ) )
D C B A C D A C C A B is all I know 2012 Australia
#define max2(a,b) (b>a?b:a) #define max3(a,b,c) (max2(a,max(b,c)))
A mathematical function declared in math.h: double pow (double b, double q);
Rebound central 7 (G), rebound double 6 (F), rebound double 5 (E). Is this a countdown program? Seems to be missing the central 6 (F).
max = a > b ? a : b; max = max > c ? max : c;
You need to be more specific in what you are asking. For example, the following meets your requirements: int main() { printf("a a b a b c\n"); return 0; }
--THE SUM OF TWO NUMBERS: declare a number(2); b number(2); c number(2); begin a:=&a; b:=&b; c:=a+b; dbms_output.put_line(a ' + 'b' = 'c); end;
R = (A > B && A > C) ? A : (B > C) ? B : C; // parentheses not necessary - for clarity only