Wednesday, March 18, 2020

  • Session

    Input & Ouput
  • Question ID

    1111210048 : key gaming
  • Problem Description

    Read 2 numbers x and y as input and read a key value. If a key is divisible by either x or y print as accept, if the key is divisible by both x and y print as strong key otherwise print as reject. Key must be greater than x and y. If the key is smaller than x and y print as impossible.
  • Logic Test Case 1

    Input (stdin)
    11 30
    
    60
    
    
    
    
    
    
    Expected Output
    accept
    
    
    
    
  • Logic Test Case 2

    Input (stdin)
    20 30
    
    60
    
    
    
    
    Expected Output
    strong






#include <stdio.h>
int main()
{
  int x,y,c;
  scanf("%d%d%d",&x,&y,&c);
  if((c>x)&&(c>y))
  {
    if((c%x==0) && (c%y==0))
    {
     printf("strong");
    }
    else if((c%x==0) || (c%y==0))
     {
     printf("accept");
     }
    else
     {
     printf("reject");
     }
  }
  else
  {
    printf("impossible");
  }
     return 0;
}
  • Session

    Input & Ouput
  • Question ID

    1111110035 : Sum of the series
  • Problem Description

    Swetha has a doubt in Mathematics. She has to find the sum value for the following series. Your task is to write a code to find the sum of the following series 1+(1+2)+ (1+2+3)+ (1+2+3+4)++n

    Input:
    Input should contain the value of the limit n

    Output:
    It should print the Sum of series upto n limit
  • Logic Test Case 1

    Input (stdin)
    4
    
    
    Expected Output
    20
  • Logic Test Case 2

    Input (stdin)
    6
    
    
    Expected Output
    56




#include<stdio.h>
int main(){
int n,sum,sum1=0,i,j;
//printf("Please enter an integer n=");
scanf("%d",&n);
for(i=1;i<=n;i++){
sum=0;
for(j=1;j<=i;j++)
sum=sum+j;
sum1=sum1+sum;
}
printf("%d\n",sum1);
return 0;
}
  • Session

    Input & Ouput
  • Question ID

    1111110004 : IO 33
  • Problem Description

    Raj deposit Rupees 10000 into a bank account paying 7% simple interest per year. He left the deposited money in the account for 5 years. Find the interest earned and the amount at the end of those 5 years by Raj? Help him to find the interest and amount resided in bank after 5 years?

    STEP 1: Find an interest by using the formula I=P<=i<=t, where I is interest, P is total principal, i is rate of interest per year, and t is total time in years.

    STEP 2: Find an amount by using the formula A=P+I, where A stands for Amount

    Input and Output Format:

    Refer sample input and output for formatting specification.

    All float values are displayed correct to 2 decimal places.

    All text in bold corresponds to input and the rest corresponds to output.
  • Logic Test Case 1

    Input (stdin)
    10000
    
    7
    
    5
    
    
    Expected Output
    Interest=3500.00
    
    Amount=13500.00
  • Logic Test Case 2

    Input (stdin)
    20000
    
    8
    
    4
    
    
    Expected Output
    Interest=6400.00
    
    Amount=26400.00  





  • Session

    Input & Ouput
  • Question ID

    1111110056 : Big
  • Problem Description

    Malu and Doss have play game.The condition to this game is both have to collect bangles from bowl one by one at a given time. Finally the judge have to decide who is the winner based on the count.
  • Logic Test Case 1

    Input (stdin)
    10
    
    5
    
    
    Expected Output
    10
  • Logic Test Case 2

    Input (stdin)
    4
    
    7
    
    
    Expected Output
    7
  • Session

    Input & Ouput
  • Question ID

    1111110056 : Big
  • Problem Description

    Malu and Doss have play game.The condition to this game is both have to collect bangles from bowl one by one at a given time. Finally the judge have to decide who is the winner based on the count.
  • Logic Test Case 1

    Input (stdin)
    10
    
    5
    
    
    Expected Output
    10
  • Logic Test Case 2

    Input (stdin)
    4
    
    7
    
    
    Expected Output
    7


#include <stdio.h>
int main()
{
  int a,b;
  
  scanf("%d%d",&a,&b);
  if(a<b)
    printf("%d",b);
   else 
     printf("%d",a);
    
  

return 0;
}
  • Session

    Input & Ouput
  • Question ID

    1111110056 : Big
  • Problem Description

    Malu and Doss have play game.The condition to this game is both have to collect bangles from bowl one by one at a given time. Finally the judge have to decide who is the winner based on the count.
  • Logic Test Case 1

    Input (stdin)
    10
    
    5
    
    
    Expected Output
    10
  • Logic Test Case 2

    Input (stdin)
    4
    
    7
    
    
    Expected Output
    7


#include <stdio.h>
int main()
{
  int a,b;
  
  scanf("%d%d",&a,&b);
  if(a<b)
    printf("%d",b);
   else 
     printf("%d",a);
    
  

return 0;
}
  • Session

    Input & Ouput
  • Question ID

    1111110004 : IO 33
  • Problem Description

    Raj deposit Rupees 10000 into a bank account paying 7% simple interest per year. He left the deposited money in the account for 5 years. Find the interest earned and the amount at the end of those 5 years by Raj? Help him to find the interest and amount resided in bank after 5 years?

    STEP 1: Find an interest by using the formula I=P<=i<=t, where I is interest, P is total principal, i is rate of interest per year, and t is total time in years.

    STEP 2: Find an amount by using the formula A=P+I, where A stands for Amount

    Input and Output Format:

    Refer sample input and output for formatting specification.

    All float values are displayed correct to 2 decimal places.

    All text in bold corresponds to input and the rest corresponds to output.
  • Logic Test Case 1

    Input (stdin)
    10000
    
    7
    
    5
    
    
    Expected Output
    Interest=3500.00
    
    Amount=13500.00
  • Logic Test Case 2

    Input (stdin)
    20000
    
    8
    
    4
    
    
    Expected Output
    Interest=6400.00
    
    Amount=26400.00  




#include <stdio.h>
int main() 
{ int a,b,c;
scanf("%d %d %d",&a,&b,&c); 
 float i=((a/100)*b)*c;
 float amount=i+a;
 printf("Interest=%.2f\n",i);
 printf("Amount=%.2f", amount);
 return 0; 
}

cisco Cybersecurity Essentials Quiz 8 answer in bold

Question  1 Correct Mark 2.00 out of 2.00 Flag question Question text A company has had several incidents involving users downloading unauth...