Guest User

Guest User

  • Tech Writer
  • 13
  • 2.3k

wants it to print successthree times and never write failure

Nov 29 2018 6:05 AM
im getting sucess.failure, sucess
  1. using System;  
  2. namespace HelloWorld  
  3. {  
  4. class Program  
  5. {  
  6. static void Main(string[] args)  
  7. {  
  8. int i, j, k;  
  9. i = 10;  
  10.  j = 20;  
  11.  k = 30;  
  12.  if(i <= 10)  
  13.  {  
  14.  Console.WriteLine("Success");  
  15.   }  
  16.    
  17.  if(j < 20)  
  18.  {  
  19.  Console.WriteLine("Failure");  
  20.  }  
  21.    
  22.  if(i > 5)  
  23.  {  
  24.  Console.WriteLine("Failure");  
  25.  }  
  26.    
  27.  if(j > 14)  
  28.  {  
  29.  Console.WriteLine("Success");  
  30.  }  
  31.    
  32.  if(k == 14)  
  33.  {  
  34.  Console.WriteLine("Success");  
  35.  }  
  36.  }  
  37.  }  
  38. }  

Answers (1)