program to print this triangle
*
* *
* * *

Answer Posted / saravana kumar

void main()
{
int i , j , k ;
for(i = 0 ; i < 3 ; i++)
{
for (k = 2 ; k >= i ; k--)
{
printf (" ") ;
}
for(j = 0 ; j<= i ; j++)
{
printf ("* " , i , j) ;
}
printf ("\n") ;
}

Is This Answer Correct ?    7 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between struct and class in terms of access modifier.

699


How java is different from c and c++?

647


Can there be at least some solution to determine the number of arguments passed to a variable argument list function?

605


can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is somewhere #include #include #include using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<

1643


What does the ios::ate argument do?

667






What is low level language in simple words?

565


What is the benefit of c++?

603


What is a buffer c++?

584


Is map thread safe c++?

634


Can I uninstall microsoft c++ redistributable?

610


What is the limitation of cin while taking input for character array?

1457


What happens when the extern "c" char func (char*,waste) executes?

638


What is data binding in c++?

508


What is binary object model?

602


Why Pointers are not used in C++?

624