ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
   
 
Categories  >>  Code Snippets  >>  Programming Code  >>  Dot Net Code  >>  C Sharp Code
 
 


 

 
 ASP.NET Code interview questions  ASP.NET Code Interview Questions
 VB.NET Code interview questions  VB.NET Code Interview Questions
 C Sharp Code interview questions  C Sharp Code Interview Questions
 ADO.NET Code interview questions  ADO.NET Code Interview Questions
Question
. Write a program to print the following outputs using for loops
			     $ $ $ $ $	
	                      $ $ $ $
                                $ $ $
                                  $ $
                                    $
 Question Submitted By :: Raja
I also faced this Question!!     Rank Answer Posted By  
 
  Re: . Write a program to print the following outputs using for loops $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
Answer
# 1
namespace Print_
{
class Program
{
static void Main(string[] args)
{
Print pr = new Print();
pr.Print1("7",7);
Console.ReadLine();
}
}
class Print
{

public void Print1(string str,int noPerLine)
{
for (int j = 1; j <= noPerLine; j++)
{
int k = j - 1;
while (k >= 1)
{
Console.Write("*");
k--;
}
for (int i = j; i <= noPerLine; i++)
{

Console.Write(str);

}
Console.WriteLine('\n');

}
}
}
}
 
Is This Answer Correct ?    1 Yes 4 No
Srinivas Munagapati
 
  Re: . Write a program to print the following outputs using for loops $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
Answer
# 2
namespace Print_
{
class Program
{
static void Main(string[] args)
{

Print pr = new Print();
pr.Print1("6",6);
Console.ReadLine();
}
}
class Print
{

public void Print1(string str, int noPerLine)
{
for (int j = 1; j <= noPerLine; j++)
{
int k = j - 1;
while (k >= 1)
{
Console.Write("$");
k--;
}
Console.WriteLine('\n');
}
 
Is This Answer Correct ?    0 Yes 1 No
Madhu
 
 
 

 
 
 
Other C Sharp Code Interview Questions
 
  Question Asked @ Answers
 
Write a program to count the number of characters, number of words, number of line in file. Mind-Tree2
Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik Mind-Tree1
how does the below eqation proceed to be solved: x*=y+z options: x=x*y+z or x=x*(y+z)  1
How to Create a Treeview Menu in ASP.NET with C#?  1
Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number. Mind-Tree1
how can i split sting in textbox in windows application using c# .net  2
working with arrays  1
Can you declare an array of mixed Types? HCL1
how do i copy textbox contents of 1 form to another form Wipro4
Automatically Hyperlink URLs and E-Mail Addresses in ASP.NET Pages with C#  1
program to reverse the order of digits in a given number of any length. Mind-Tree1
Write a program to input an integer and - display the reverse - display the sum of each digit - should include logic that considers the input number as any number of digits long Mind-Tree2
 
For more C Sharp Code Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com