Thursday, October 25, 2012

Modul II : Tugas II (Operator)


Name : Phirum Tan
Major : Tiknik Media Digital
Hello!Teacher this is my video Tutorial Tugas II (Operator) link on youtube  that explain about how to use some arithmetic operations commonly used in C programming language and here is my 10 pieces of questions that will be show you. The following variable used in this program are : 
 int i = 8, j = 5, k;
 float x = 0.005, y = -0.01, z;
and this is my 10 questions:
         //z = (3 * i - 2 * j) % (2 * j - 4);
 //z = (i-3 * j) % ( 12 +2 *j ) / ( x - y );
    //z = -(i + j );
//z = (x > y) && (i > 0) && ( j < 5 );
//z = x >= 0;
        //z = j!= 6;
//z = i %= j;
//z = i += (j -2);
// k = ( j == 5) ? i : j;
//k = ( j > 5 ) ? i : j;

For my Source Code :

#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int i=8,j=5,k;
float x=0.005,y=-0.01, z;
z = (3 * i - 2 * j) % (2 * j - 4);
/*z = (i-3 * j) % ( 12 +2 *j ) / ( x - y );
z = -(i + j );
z = (x > y) && (i > 0) && ( j < 5 );
z = x >= 0;
z = j!= 6;
z = i %= j;
z = i += (j -2);
k = ( j == 5) ? i : j;
k = ( j > 5 ) ? i : j;*/

printf ("So that Z = %f \n",z);
//printf ("So that K = %d \n",k);
system ("pause");
return 0;
}



Video link on youtube : http://youtu.be/mZg2QIRvhcA


No comments:

Post a Comment