Tuesday, December 7, 2010

CrazyEngineers Forum - Computer Science & IT Engineering

CrazyEngineers Forum - Computer Science & IT Engineering


A mechanical engineer confused if IF ELSE statement can do this

Posted: 06 Dec 2010 10:01 PM PST

Hi

i have confusion. i am writing a C program for a quiz. i wanna know if we can give the user 2 tries to enter the answer. here is the simple program. please have a look.

Code:

#include <stdio.h>
int main()
{
        char ans, ans2;
        printf("What is the equivalent value of 0 Farenheit in Celcius?\na.) 0\nb.) -40\nc.) -17.78\n");
        scanf("%c",&ans);
       
        if (ans=='c')
        {
                printf("You are Smart!!!!!\n");
               
        }
        else
        {
                printf("You are Dumb!!!\n");
                printf("Give it another try\n");
                scanf("%c",&ans2);
               
                if (ans2=='c')
                {
                        printf("Thank God!!!!......Finally you are correct\n");
                }
                else
                {
                        printf("you are the Dumbest person on Earth\n");
                }}
        return 0;
}

How to start coding CORE BANKING SIMULATION using (jdbc,html,database)

Posted: 06 Dec 2010 08:29 AM PST

i would like to do a mini project on CORE BANKING SIMULATION using(jdbc,html,database)....anyone of u plz help me how to do and how to start it......

Round Robin Algorithm Implementation

Posted: 06 Dec 2010 05:03 AM PST

i want to implement the algorithm of round robin to allocate the time slot to the various tasks of different time unit by using the concept of multitasking

No comments:

Post a Comment