Comprog Plates
Comprog Plates
Comprog Plates
Course No. & Description: ES 212- Computer Programming 1 Schedule: TTh (7:30-9:00 am)
Plate Number & Title: PLATE # 1 - INTRODUCTION Rating:
int main ( )
Return 0;
}
Name: Rocelle Ralph D.Ogoc Course & Year Level: BSCE–CEM 2A
Course No. & Description: ES 212-Computer Programming 1 Schedule: TTh (7:30-9:00 am)
Plate Number & Title: PLATE # 2 - DECLARATION OF VARIABLES Rating:
STRING
#include <iostream>
int main ( ) {
string x = "Rocelle";
return 0; }
CHAR
#include <iostream>
int main ( ) {
BOOL
#include <iostream>
int main ( ) {
bool b1 = true;
bool b2 = false;
return 0; }
INT
#include <iostream>
int main ( ) {
#include <iostream>
int main ( ) {
int num = 9;
float a,b;
a = num/4;
b= num/4.0;
return 0; }
DOUBLE
#include <iostream>
int main() {
cout << "Sum of both the numbers entered: " << (n_1+n_2);
return 0; }
AREA OF RECTANGLE
#include <iostream>
int main( ) {
area = len*wid;
PERIMETER OF RECTANGLE
#include <iostream>
int main ( ) {
float len, wid, per;
per = 2*(len+wid);
AREA OF TRIANGLE
#include <iostream>
int main( ) {
float b, h, area;
cin >> b;
cin >> h;
area = 0.5*b*h;
return 0; }
Name: Rocelle Ralph D.Ogoc Course & Year Level: BSCE-CEM 2A
Course No. & Description: ES 212-Computer Programming 1 Schedule: TTh (7:30-9:00 am)
Plate Number & Title: PLATE # 4 - ARRAYS Rating:
INT ARRAY
# include <iostream>
int main ( ) {
cout<<arr[0]<<endl;
cout<<arr[1]<<endl;
cout<<arr[2]<<endl;
cout<<arr[3]<<endl;
cout<<arr[4]<<endl;
return 0; }
STRING ARRAY
#include <iostream>
int main ( ) {
cout<<subject[1]<<endl;
cout<<subject[2]<<endl;
cout<<subject[3]<<endl;
cout<<subject[4]<<endl;
return 0; }