Flowchart Logic 047

 Coding Problem Keys 

 Flowchart Logic 047 

 Problem Statement 

Please fill in the lines of code to implement the logic present in the flowchart.

 Example Input/Output 1 

 Input 

18 4 10

 Output 

1 2 11 13 14 16 17

 Note: Max Execution Time Limit: 50 millisecs 

 Solution 

 Programming Language: Python 3 Language 

N,X,Y=map(int,input().split())
ctr=1
while(ctr<=N):
    if((ctr<X or ctr>Y) and ctr%3!=0):
        print(ctr,end=" ")
    ctr+=1

# Published By PKJCODERS

 Programming Language: C Language 

#include <stdio.h>
#include <stdlib.h>

int main() {
    int N,X,Y;
    scanf("%d%d%d",&N,&X,&Y);
    int ctr=1;
    while(ctr<=N){
        if((ctr<X || ctr>Y) && ctr%3!=0){
            printf("%d ",ctr);
        }
        ctr++;
    }
}

// Published By PKJCODERS

 (Note: Incase If the code doesn't Pass the output kindly comment us with your feedback to help us improvise.) 

Comments

Popular Posts

Toggle Consonants Adjacent to Vowels

String Pattern - Inverted U

Top Scoring Batsman - TEST ODI 20-20

Desktop Products

Mango Distribution

Java - Method Overriding - Area

Microsoft