# data[].attributes.attachment_link.readable_text
#include <iostream>
#include<stdio.h>
#include<iostream>
using namespace std;
int main() 
{
   int numArray[10];
   int i, sum = 0;
   int *ptr;
 
   /*cout <<"Enter 10 numbers : \n";*/
 
   for (i = 0; i < 10; i++)
    
	  scanf("%d",numArray[i]);
 
   ptr = numArray; 
 
   for (i = 0; i < 10; i++) 
   {
   	  cout <<"Enter 10 numbers : \n";
      sum = sum + *ptr;
      
      ptr++;
   }
 
   cout <<"The sum of numbers: "<< sum;
   
   	cout << "\n\nNUR AMIRUL HAKIM BIN NORHISHAM \n";
	cout << "25DDT17F1026\n";
	cout << "DDT1A";
	
	return 0;
	
}

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
 
int main () {

   int loop;
	
   for( loop = 1; loop <= 10; loop ++ )
   {
      cout<< loop <<endl;
   }
   
   	cout << "\n\nNUR AMIRUL HAKIM BIN NORHISHAM \n";
	cout << "25DDT17F1026\n";
	cout << "DDT1A";
 
   return 0;
}

# data[].attributes.attachment_link.readable_text
#include <iostream>

using namespace std;

int main()
{
	int counter =1;
	float average , total=0;
	for (counter=1;counter<=5;counter++)
	{
		int num;
		cout << "PLEASE INPUT YOUR NUMBER :";
		cin >>num;
		total=total+num;
	}
	
	average=total/5;
	cout << "AVERAGE :"<<average<<endl;
	
	cout <<endl;
	
	cout << "*\n";
	cout << "**\n";
	cout << "***\n\n";
	
	cout << "NUR AMIRUL HAKIM BIN NORHISHAM \n";
	cout << "25DDT17F1026\n";
	cout << "DDT1A";
	
	return 0;
	
	
	
}

# data[].attributes.attachment_link.readable_text
#include <iostream>

using namespace std;

main()
{
	int a=21;
	int b=10;
	int c;
	
	c=a+b;
	cout << "Line 1 - Value of c is : " <<c<<endl;
	c=a-b;
	cout << "Line 2 - Value of c is : " <<c<<endl;
	c=a*b;
	cout << "Line 3 - Value of c is : " <<c<<endl;
	c=a/b;
	cout << "Line 4 - Value of c is : " <<c<<endl;
	c=a%b;
	cout << "Line 5 - Value of c is : " <<c<<endl;
	c=a++;
	cout << "Line 6 - Value of c is : " <<c<<endl;
	c=a--;
	cout << "Line 7 - Value of c is : " <<c<<endl;
	
	cout <<endl;
	
	cout << "*\n";
	cout << "**\n";
	cout << "***\n\n";
	
	cout << "NUR AMIRUL HAKIM BIN NORHISHAM \n";
	cout << "25DDT17F1026\n";
	cout << "DDT1A";
	
	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <iostream>

using namespace std;

int main()
{
	char name[50];
	
	cout << "please enter your name :";
	cin >> name;
	cout << "your name is :" <<name <<endl <<endl;
	
	cout << "*\n";
	cout << "**\n";
	cout << "***\n\n";
	
	cout << "NUR AMIRUL HAKIM BIN NORHISHAM \n";
	cout << "25DDT17F1026\n";
	cout << "DDT1A";
	
}

# data[].attributes.attachment_link.readable_text
// my second program in C++

#include <iostream>

using namespace std;

int main ()
{
	cout << "Hello World! \n";
	cout << "I'm a C++ program \n\n";
	
	cout << "*\n";
	cout << "**\n";
	cout << "***\n\n";
	
	cout << "NUR AMIRUL HAKIM BIN NORHISHAM \n";
	cout << "25DDT17F1026\n";
	cout << "DDT1A";
}

# data[].attributes.attachment_link.readable_text
#include <iostream>

using namespace std;

main ()
{
	int a=21;
	int b=10;
	int c;
	
	if ( a==b )
	{
		cout << "Line 1 - a is equal to b" <<endl;
	}
	else
	{
		cout << "Line 1 - a is not equal to b" <<endl;
	}
	if ( a<b )
	{
		cout << "Line 2 - a is less than b" <<endl;
	}
	else
	{
		cout << "Line 2 - a is not less than b" <<endl;
	}
	if ( a>b )
	{
		cout << "Line 3 - a is greater than b" <<endl;
	}
	else
	{
		cout << "Line 3 - a is not greater than b" <<endl;
	}
	
	cout <<endl;
	
	cout << "*\n";
	cout << "**\n";
	cout << "***\n\n";
	
	cout << "NUR AMIRUL HAKIM BIN NORHISHAM \n";
	cout << "25DDT17F1026\n";
	cout << "DDT1A";
}

# data[].attributes.attachment_link.readable_text
#include <iostream>

using namespace std;

int main ()
{
	double amountofloan , loaninterestrate , amountofinterest , totalloanandinterest , paidpermonth;
	int loantenure , totalyears;
	
	cout <<endl<< "\n WELCOME TO THE MIRUL's BANK \n";
	
	cout << "\n amount of your loan : RM ";
	cin >> amountofloan;
	
	cout << "\n loan interest rate (%) : ";
	cin >> loaninterestrate;
	
	cout << "\n loan tenure (years) :";
	cin >> loantenure;
	
	amountofinterest=(amountofloan*loaninterestrate)/100*loantenure;
	
	totalloanandinterest=amountofinterest+amountofloan;
	
	totalyears=loantenure*12;
	
	paidpermonth=totalloanandinterest/totalyears; 
	
	cout<<endl;
	
	cout << "*"<<endl;
	cout << "**"<<endl;
	cout << "***"<<endl;
	
	cout<< "xX RESULT Xx";
	cout<< endl;
	
	cout << "\ntotal interest paid in " <<loantenure<< "years : RM";
	cout << amountofinterest;
	cout <<endl;
	
	cout << "\ntotal amount including in "<<loantenure<< "years : RM";
	cout << totalloanandinterest;
	cout <<endl;
	
	cout << "\namount paid per month : RM";
	cout <<paidpermonth;
	
	return 0;
}
