hi everyone,
i am new in C. can anyone help me to solve the following problem:

write a small program in CLIP to code that shall work like a simple computerized study advisor. Your program will collect some data from the user and then suggest a field of study. To keep this simple, we have limited and restricted our cases to have a simple design, good enough to give you the basic idea. You need to follow the stated conditions in true spirit.

Your program shall talk to the user in the following manner:
The first message shall appear on screen as below after the program is executed with (run) command.
Welcome, I am your computerized study advisor...
Please enter your student ID: mc1236 (let say user enter)
Enter your Name: Ali (let say user enter)
User shall type his/her ID and Name that will be recorded as facts in the system. Next program shall ask user to enter marks in math’s subject. If student marks in math subject is below 50 then system shall simply advise the student to take admission in FA. Otherwise (i.e. in case where student marks in math subject is greater or equal to 50) the system ask user to enter student marks in science subject. Now, if student marks in science subject is below 50 then system shall advise the student to take admission in ICS. Otherwise (i.e. in case where student marks in science subject is greater or equal to 50) the system shall advise the student to take admission in F.Sc.

Thankx for advance...

It's a simple statement to Code..

#include <stdio.h>
#include <string.h>

int main()
{
    char studentName[20],studentID[10];
    int marksInMath,marksInScience;

    printf("Welcome, I am your computerized study advisor...\n");

    printf("\nPlease enter your student ID: ");
    scanf("%s",studentID);
    getchar();
    printf("\nEnter your Name: ");
    gets(studentName);

    printf("\nEnter Your marks in Math's subject: ");

    scanf("%d",&marksInMath);

    if(marksInMath>=50)
    {
        printf("\nEnter Your marks in Science's subject: ");

        scanf("%d",&marksInScience);

        if(marksInScience >=50)
            printf("\n%s, You should Take admission in F.Sc\n",studentName);
        else
            printf("\n%s, You should Take admission in ICS\n",studentName);
    }
    else
        printf("\n%s, You should Take admission in FA\n",studentName);
    return 0;
}

Hopefully this code may help.

Do you mean CLIP or CLIPS? CLIPS stands for "C Language Integrated Production System" and is used for expert systems (rule based).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.