skip to main | skip to sidebar

Wednesday, August 24, 2011

Requested Tutorial Basic input with if else Conditions

0 comments
A sociological study clasifies a family of three persons as POOR, MIDDLE CLASS and WEALTHY. provided that family income is less than 12,000.00 Php between 12,000.00 and 70,000.00 Php respectively.

The Problem

Create a program which acepts family income as input from the user and displays the proper classification of the family.
FAMILY INCOME CLASSIFICATION
FAMILY INCOME
below 12,000 - POOR
12,000 - 70,000 - MIDDLE CLASS
above 70,000 - WEALTHY

Requested By: Jp Natividad


#include <stdio.h>
#include <conio.h>

void main() {
clrscr();
int income;
printf("Enter your income: ");
scanf("%d",&income);
if (income < 12000) {
printf("Family income classification: POOR \n\n");
printf("FAMILY INCOME: %d",income);
}
else if(income >= 12000 && income <= 70000)
{
printf("Family income classification: MIDDLE CLASS \n");
printf("FAMILY INCOME: %d",income);
}
else if(income > 70000)
{
printf("Family income classification: WEALTHY \n");
printf("FAMILY INCOME: %d",income);
}
getch();
}




Tuesday, August 23, 2011

Simple Arithmetic Operation using Selective Structure Switch

0 comments
















#include <stdio.h>
#include <conio.h>

void main() {
clrscr();
int operand1, operand2;
char oprtor;
printf("Enter the first number: ");
scanf("%d",&operand1);
printf("\nEnter the second number: ");
scanf("%d",&operand2);
printf("\nEnter operation: ");
scanf("%s",&oprtor);
switch (oprtor) {
case '+': //Addition
printf("%d %c %d = %d",operand1, oprtor, operand2, operand1 + operand2 );
break;
case '-': // Subtraction
printf("%d %c %d = %d",operand1, oprtor, operand2, operand1 - operand2 );
break;
case '*': //Multiplication
printf("%d %c %d = %d",operand1, oprtor, operand2, operand1 * operand2 );
break;
case '/': //Division
printf("%d %c %d = %d",operand1, oprtor, operand2, operand1 / operand2 );
break;
case '%': // Modulo, display the Reamaider
printf("%d %c %d = remainder %d",operand1, oprtor, operand2, (operand1) % operand2 );
break;
default:
break;
}
getch();
}

Simple Arithmetic Operation using Conditional Structure if & else in C Language

0 comments

This source code perform simple arithmetic operation using Conditional structure (if & else) and Arithmetic operators ( +, -, *, /, % ).












#include <stdio.h>
#include <conio.h>

void main() {
clrscr();
int operand1, operand2;
char oprtor;
printf("Enter the first number: ");
scanf("%d",&operand1);
printf("\nEnter the second number: ");
scanf("%d",&operand2);
printf("\nEnter operation: ");
scanf("%s",&oprtor);
if (oprtor == '+') { //Addition
printf("%d %c %d = %d",operand1, oprtor, operand2, operand1 + operand2);
}
else if (oprtor == '-') {// Subtraction
printf("%d %c %d = %d",operand1, oprtor, operand2, operand1 - operand2);
}

else if (oprtor == '*') { //Multiplication
printf("%d %c %d = %d",operand1, oprtor, operand2, operand1 * operand2);
}
else if (oprtor == '/') { //Division
printf("%d %c %d = %d",operand1, oprtor, operand2, operand1 / operand2);
}
else if (oprtor == '%') { // Modulo, display the Reamaider
printf("%d %c %d = remainder %d",operand1, oprtor, operand2, (operand1) % operand2);
}
getch();

}

Sunday, August 21, 2011

How to find Grade equivalent using C Language

0 comments
This program was the first requested tutorial on C programming Language using the Turbo C++ IDE.

This source code will determine the corresponding equivalent of your grade using the conditional structure if & else and selective structure switch.


Requested by: Jp Natividad


#include<stdio.h>
#include<conio.h>

float eq; // global variable

void main() // main function
{
clrscr();
int grade; // contains the value input

printf("enter your grade: ");
scanf("%d",&grade);


//conditions

if(grade <= 74 ) {
printf("FAILED");
eq = 5.00;
}
else if (grade >= 75 && grade <=100) {
printf("PASSED\n");

switch (grade){
case 75: case 76: case 77:
eq = 3.00; break;
case 78: case 79: case 80: case 81:
eq = 2.75; break;
case 82: case 83:
eq = 2.50; break;
case 84: case 85: case 86:
eq = 2.25; break;
case 87: case 88: case 89:
eq = 2.00; break;
case 90: case 91: case 92:
eq = 1.75; break;
case 93: case 94: case 95:
eq = 1.50; break;
case 96: case 97: case 98:
eq = 1.25; break;
case 99: case 100:
eq = 1.00; break;
default:
break;
}
}
else {
printf("invalid\n");

}
printf("your equivalent grade is: %.2f",eq);

getch();

}

Friday, August 19, 2011

What is C Programming Language?

0 comments
C Programming Language is a general-purpose computer programming language developed by Dennis Ritchie between 1969 and 1973 at the Bell Telephone Laboratories for use with the Unix operating system.

C is one of the most widely used programming languages for various reasons.

It has high-level constructs.
It can handle low-level activities.
It produces efficient programs.
It can be compiled on a variety of computers.

The syntax of the C programming language is a set of rules that specifies whether the sequence of characters in a file is conforming C source code. The syntax of textual programming languages is usually defined using a combination of regular expressions.

The syntax of a programming language is the set of rules that define the combinations of symbols that are considered to be correctly structured programs in that language.

Before you start programing you need a text editor there are many text editor available online, the most popular text editor are Vim and Emacs, a text editor with syntax highlighting is recommended as it can make code easier to read. Highlighting can also make it easy to spot syntax errors.

If you choose to use a text editor, you will be required to have a C compiler. The most popular C compilers GNU C Compiler, Visual Studio Express, Borland C Compiler. A compiler is a program that converts C code into executable machine code.

Or you can download an IDE (Integrated Development Environment) over a text editor and compiler. An IDE is a program that combines a set of programs that developers need into one convenient package, usually with a graphical user interface. These programs include a compiler, linker, and text editor. Most popular IDE use CDT, Dev C++, Xcode and Microsoft Visual Studio Express.

On Microsoft Windows, Microsoft Visual Studio Express, may be helpful for beginners but requires setting up a compilation project before making an executable file.

On Mac OS X, the Xcode IDE provides the compilers needed to compile various source files.

Sample Program that will print "Hello World" on screen

hello.c

#include <stdio.h>

int main () {
printf("Hello World! \n");

return 0;
}



Saturday, August 13, 2011

Kidney Kard

0 comments

The Kidney Kard is a comprehensive collection of the tools needed to interpret acid-base, renal, and electrolyte problems especially in patients with chronic or acute renal failure.
Medical students, residents, fellows in nephrology or urology, and physicians taking care of patients with kidney problems will find the Kidney Kard useful with a flick or click of their fingers.

If the stethoscope is for the cardiologist, otoscope for the ENT specialist, and ophthalmologist for the eye doctor, Apple’s Kidney Kard app is for the modern nephrologist.

Parents Diagnostic Aid (PDA)

0 comments


Parent’s Diagnostic Aid, a new tool to help your child
A doctor’s office with a wall to wall mothers and children can be hazardous to your child’s health. Why? It is probably one of the leading cause of medical and diagnostic errors.

About 45% of 1362 USA pediatricians, in a survey reported at the July 2010 issue of PEDIATRICS, a popular reading journal of pediatricians, made a wrong diagnosis that harmed children.
There are many reasons why a diagnosis could be wrong. One of them is a crowded waiting room. When there are many parents and children in a
waiting room, some of the medical office staff can become easily stressed, hurried, and cut corners. Such environment is fertile for medical mistakes to happen.

A physician should see a patient for 15 to 20 minutes. This means that in one day 21 to 28 children can be seen in a usual un-hurried situation. However, when there are more than 28 children scheduled, the average time spent with each sick child is reduced to less than the “ideal” time.

This will expose physicians to stress and adequate time spent with your child is cut short. Occasionally this can cause diagnostic errors. For example an eight year old boy has a chronic abdominal pain sees a doctor. To diagnose this condition, at least 17 questions should be asked in Apple App PDA (Parents Diagnostic Aid) system. However, because the time is now shorter, a physician might not be able to ask all of the critical questions and potentially miss the diagnosis during the visit.

In a child who has Abdominal Migraine, when seen by a physician who is in a hurry because of over-booking, she or he might forget to ask three important questions to make this diagnosis like: Is there any one in the family with recurrent headache? Is there nose bleeding? Or is there car or sea-sickness?

When I was in practice, I often miss the diagnosis of Abdominal Migraine before EMR.

However, with an Electronic Medical Records with 17 questions embedded in it, I was able to make the right diagnosis of children with Abdominal migraine even though I was overbooked.

Unfortunately, only 30% of physicians in the USA have computers in their examining rooms. In this current environment, medical mistakes including diagnostic errors are common happenings.

To help this situation, we created an Apple app called Parents Diagnostic Aid (PDA). In this app is a list of scripted questions for the most common problems in children like fever, chronic cough, wheezing, headache, etc. that I used in my pediatric practice at Bangor, Maine. Ideally, I think all physicians should ask all questions that should include serious conditions in their thinking radar. If these questions are not asked, a serious illness can be easily missed resulting to injury or even death.

Suppose your child has a prolonged fever. Before you visit a doctor, you can first read and answer the 12 questions under “Fever” then bring it the doctor.

With the PDA it will save the physician time in getting the clinical history and at the same time reduce the chance of missing a critical question that might lead to the right diagnosis. All of the important questions are easily available in this new Apple app.

When all of the questions about Fever is answered and “i” is tapped, a parent will have an idea of the most likely diagnosis of their child before the office visit. A parent can then ask an intelligent question during the visit. By so doing, they can be part of the medical team in the treatment of their love one.

Armed with Parent’s Diagnostic Aid now you can have a basic idea on the possible illness reducing the chance of medical errors which is happening in thousands of children being seen by a physician every day.

Medical Apps Developer’s Team



What's New In Version 2.0

We have a better navigation with new icons.

Important Physical examinations of each symptoms in an easy format to read.

Critical tests for each symptoms follow the Physical Examination.

General summary of treatment.

A reliable source of further information and treatment mentioned in the
description.

Friday, August 12, 2011

Smart Baby Program

1 comments
This App will teach parents how to demonstrate the concepts of counting, adding, subtraction, fraction, and early reading. This is based on research studies that the environment which is the family is the most critical factor in making our children happier and smarter. And if these activities are done with fun, as early as possible, the outcome is a happy and smart child both at home and at the school. These methods has been used in a pediatric office at Bangor, Maine successfully.


Early Education Works, Study Showed

In a study by Frances Campbell of University of North Carolina, it was shown that early childhood education is an important factor on the success of poor children. “Learning begins in infancy. Education should too,” Campbell stated.

In 1972, Dr. Ramsey, at the Frank Porter Graham Child Development Center enrolled 111 infants from low-income families (98% from black families) and randomly assigned 57 of the babies to high quality child care center. Among those who received the early high quality program, 40% were still in school; but only 20% for those who did not receive the care.

The study showed that 35% of those who receive the early care were still attending or had graduated from a 4-year college course compared to only 14% from those who did not.

Those who were also under the early quality care center had higher scores on both reading and math tests and about 65% of them were employed compared with the 50% of those who did not go under the early quality care.

The early quality child care program called the Abecedarian Project was different from the traditional day care program. Babies were enrolled as early as 6 months old, attended every day for the whole year round and the methods focused on the social, emotional, and cognitive activities.

This study by Dr. Ramsey clearly showed why children should have an early education from infancy.