All pastes #419920 Raw Edit

rolarga

public cpp v1 · immutable
·published 2007-04-01 19:01 UTC
rendered paste body
//---------------------------------------------------------------------------#include <vcl.h>#include <iostream>#include <conio>#pragma hdrstopvoid a();void b();//---------------------------------------------------------------------------#pragma argsusedint main(int argc, char* argv[]) {  b();  return 0;}//------------ Unit 1 --------------------------------------------// a)  void a() {    std::string out;    std::string text = "Nullpointer.. muharrrr";    for (int r = 1; r <= 10; ++r) {      std::cout << out + text << std::endl;      out+=" ";    }    getch();    return;  }// b)  void b() {    std:int rows = 10;    std::string out;    std::string text = "Nullpointer.. muharrrr";    for (int r = 1; r <= rows; ++r) {      out+=" ";      std::cout << out + text << std::endl;      out = out.substr(0,rows-r);    }    getch();    return;  }//---------------------------------------------------------------------------