PLEASE WRITE FLOWCHART FOR THESE CODES, THEY ARE IN ONE QUESTION I JUST NEED THE FLOWCHART FOR THEM, PLEASE HELP. 1   #include int main(void) {     //dec;aring variables     int A,B,C,D;     int maximum,max1,max2;     int minimum,min1,min2;         printf("please enter first number\n A:");     scanf("%d",&A);     printf("please enter second number\n B");     scanf("%d",&B);     printf("please enter third number\n C");     scanf("%d",&C);     printf("please enter fourth number\n D");     scanf("%d",&D);     //DIVIDE THE 4 NUMBERS TO TOW GROUPS if(A>B) {     max1 = A; } else     max1 =  B;     if(C>D)     {         max2 = C;     }     else     max2 = D; //check the maximum od each GROUP if(max1>max2) {     maximum=max1; } else maximum=max2;   printf("maximum=%d\n",maximum);   if(A #define s 3 #define a 2   int main() {     int k[s][a];     int i,j;     float aver;     printf("p;ease enter array values:");     for(i=0;i int main() {     int num,count=1, sum=0;         printf("enter a positive integer:");     scanf("%d",&num);         //for loop terminates when sum is less than count         while(count<=num)     {         sum=sum+count;         count++;     }      printf("sum=%d",sum);          return 0; }

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.3: Nested If Statements
Problem 7E
icon
Related questions
Question

PLEASE WRITE FLOWCHART FOR THESE CODES, THEY ARE IN ONE QUESTION I JUST NEED THE FLOWCHART FOR THEM, PLEASE HELP.

1

 

#include<stdio.h>

int main(void)

{

    //dec;aring variables

    int A,B,C,D;

    int maximum,max1,max2;

    int minimum,min1,min2;

   

    printf("please enter first number\n A:");

    scanf("%d",&A);

    printf("please enter second number\n B");

    scanf("%d",&B);

    printf("please enter third number\n C");

    scanf("%d",&C);

    printf("please enter fourth number\n D");

    scanf("%d",&D);

    //DIVIDE THE 4 NUMBERS TO TOW GROUPS

if(A>B)

{

    max1 = A;

}

else

    max1 =  B;

    if(C>D)

    {

        max2 = C;

    }

    else

    max2 = D;

//check the maximum od each GROUP

if(max1>max2)

{

    maximum=max1;

}

else

maximum=max2;

 

printf("maximum=%d\n",maximum);

 

if(A<B)

{

    min2=A;

}

else

min2=B;

if(C<D)

{

    min2=C;

}

else

min2=D;

 

if(min1<min2)

{

    minimum=min1;

}

else

printf("minimum =%d",minimum);

//print the minimum NUMBER

return 0;

}

 

2

 

#include<stdio.h>

#define s 3

#define a 2

 

int main()

{

    int k[s][a];

    int i,j;

    float aver;

    printf("p;ease enter array values:");

    for(i=0;i<s;i++){

        for(j=0;j<a;j++){

        printf("\narray value:",i,j);

        scanf("%d",&k[i][j]);

       

    }

}

aver= 0;

for(i=0;i<s;i++){

    for(j=0;j<a;j++){

        aver+=k[i][j];

   

    }

}

aver=aver/(s*a);

printf("\nAverage=%.3f,aver");

return 0;

}

 

3

 

 

#include<stdio.h>

int main()

{

    int num,count=1, sum=0;

   

    printf("enter a positive integer:");

    scanf("%d",&num);

   

    //for loop terminates when sum is less than count

   

    while(count<=num)

    {

        sum=sum+count;

        count++;

    }

     printf("sum=%d",sum);

    

    return 0;

}

 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr