Test: are there three sides of a triangle ?

Sunday, July 4, 2010

 // C08_Ex 9: Input 3 whole number.// 3 This is an integer form three sides of a triangle or not ?// If so, what is the triangle?#include <stdio.h>void main(){    int a, b, c;    printf("Input 3 whole number: ");    scanf("%d%d%d", &a, &b, &c);    if (a + b > c && a + c > b && b + c > a)    {      ...
Read more »

Get number of days in month

Friday, July 2, 2010

 // C08_Ex 8: Input month,year// Output dates of this month#include <stdio.h>void main(){    int month, yr, result;       printf("Input month,year: ");    scanf("%d%d", &month, &yr);       if (month>=1 && month<=12)    {        switch (month)        {  ...
Read more »

 
 
 
 
Copyright © 2010 C Source Code - C++ Source Code. All Rights Reserved. Using Xclear Theme | Bloggerized by Themescook Developed by Helios | Powered by Blogger