Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

im not getting the output

0 votes
asked Jul 9, 2018 by ss
int minNum(int A, int K,int P)
{
    int res=1;
    printf("Enter number of problems Asha solves in a day:");
    scanf("%d",&A);
    printf("Enter number of problems Kelly solves in a day:");
    scanf("%d",&K);
    printf("Enter number of problems Asha is ahead to begin:");
    scanf("%d",&P);
    for(A;A<=K;A+2)
    {
        for(K;A<=K;K+4)
        {
            res=res+1;
        }    

    }
   return res;

}

1 Answer

0 votes
answered Jul 9, 2018 by anonymous
#include<stdio.h>
#include<conio.h>

int minNum(int A, int K,int P)
{
    int res = 1;
    
    for(A;A<=K;A+2)
    {
        for(K;A<=K;K+4)
        {
            res=res+1;
        }    

    }
    return res;
}

void main()
{
    int A,K,P;
    printf("Enter number of problems Asha solves in a day:");
    scanf("%d",&A);
    printf("Enter number of problems Kelly solves in a day:");
    scanf("%d",&K);
    printf("Enter number of problems Asha is ahead to begin:");
    scanf("%d",&P);
    minNum(A,K,P);
   
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...