Friday, July 11, 2014

OMG retake napud!


RETAKE DIN PAG MAY TIME    


Mao ni akoang mga activities na kinahanglan i-retake
        Mas init pa sa kape ug mas bugnaw pa sa aircon ang akong gibati. Sige lang ko retake sa mga activities. Taga retake nako kay naay deduction sa akoang scores. Nga nga nalang ko ani.
                            Tags: How to Program, C Programming, Debug, Not Easy, Why programming is hard, How to run programs in c++, squareroot program, How do i solve the program, forloop.

ERROR NAPUD SA PROGRAMMING

Mao ni ang nakalisud!

                            Tags: C++ Compiler, Programming, Debuging, Why Programming is hard?, C Compiler, How to solve programming, How to debug, How to use linklist, How to search using binary search how to debug.

Why Di Mudagan Akong Program

"Sus paita di napud mudagan
akong Program. Daghan man ERRORS."
DO NOT READ: KANTAHA PALIHUG.

I wonder how, I wonder why,
Nganong di mudagan akong program,
Mao akong na see,
Kinahanglan ko mukatkat ug lemon tree.

Why oh why lisud ang programming

5 4 3 2 1 BOOM PANES!!!
Palihug lang ko ug lantaw sa Blog archive
na naa sa kilid sa akoang gipost
DO NOT READ:
      Matingala gyud ko basta hatagan mi ug Activity sa among Instructor. Lisud kaayo sabton ang problem ug makalibog kaau murag mubuto akong utok sa kalisod. Bisan galisod ko sa programming ganahan ug interesado gihapun ko makabalo. Bahalag lisud basta huna-huna lang na kung makabalo ka anang programming mura na ka'g nakajackpot sa lotto kay daghan naka'g mabuhat nga softwares ug mga dula.

Salamat kaau kay imung gibasa.






Tuesday, July 8, 2014

Average Program

#include<iostream>
#include<conio.h>
using namespace std;
main()
{
 int g1,g2,g3;
 float ave;
 
  cout<<"Enter the first grade: ";
  cin>>g1;
 
  cout<<"Enter the second grade: ";
  cin>>g2;
 
  cout<<"Enter the third grade: ";
  cin>>g3;
 
  ave=(g1+g2+g3)/3;
 
 cout<<"The average of the grades is "<<ave<<endl;
 
}

Laboratory Application

ACTIVITY 2
Laboratory Application: 
------------------------------------------------------------------------------------------------------------
Solve the following problems using Hands-on Application:
(Note: Write your explanations on how you create the program in a comment form.)
------------------------------------------------------------------------------------------------------------

1.  Numbers contain in a serial code of a product are sometimes difficult to understand. Using one- dimensional array, create a program that reads three integer numbers and displays the numbers in a tab format so that a serial code now will be displayed correctly. If there are duplicate inputs, compute and display the sum for each input. 

Sample Run:
=======================
Enter three numbers: 8 2 2      
Numbers are: 8 2 2                
Duplicate Inputs: 2                  
Sum is 4                                 
=======================

2.  Books in the Misamis University Library are arranged according to its code number given by a librarian. If the books belong to a department, it has a code of department_initial` control number (e.g. CCS 01). Create a program using a one-dimensional array that will group numbers in an array. If the range of numbers is 1 to 10, place it in Group 1, if the range of numbers is 11 to 20, place it in Group 2 and so on. There will be ten values as interval. Your program will only terminate once the input is 0 and below. 

Sample Run:
========================
Enter an integer number: 22
22 belongs to Group 3.
Enter an integer number: 5
5 belongs to Group 1.
Enter an integer number: 0
Goodbye!
========================

3.  Use one-dimensional array to solve the following problem. Read 20 integers in which each is between 10 and 100. As each number is read, print it only if it is not a duplicate of a number already read. If the number is a duplicate one, prompt the user a message then allow to ask another number. The program will only terminate if the input is not in the range. 

Perimeter of a Square

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
main()
{
int num1, num2;
int p, a, s;
clrscr();

printf("Enter perimeter: ");
scanf("%d",&num1);
printf("Enter area: ");
scanf("%d",&num2);
p=4*s;
a=s^2;

printf("\nThe perimeter is: %d", p);
printf("\nThe area is: %d", a);
getch();
}