WEEK:1 PROGRAMMING ASSIGNMENT 1 SOLUTION (Jan 2020-Apr2020) An Introduction to Programming through C++ NPTEL 2020

    

               An Introduction To Programming Through C++


IIT Bombay.

Week 1 - Programming Assignment 1


*.Write a program that reads in a number n and prints out n rows each containing n star characters, '*'. 
Thus if n is 3, then your program should print

***
***
***

TEST CASES:


Sample Test Cases
Test Case 

Input           Output

3                          ***
                            ***
                            ***

PROGRAM:


#include <iostream>
using namespace std;
main_program
{
  int n; 
  cin >> n;
  repeat(n){
    repeat(n){
      cout <<'*';
    }
    cout << endl;
 }
}

WEEK :1 PROGRAMMING ASSIGNMENT 2 SOLUTION
CLICK ON BELOW LINK.
<<CLICK HERE FOR PROGRAMMING ASSIGNMENT 2 WEEK 2>>
FOLLOW OUR WEBSITE FROM THE BUTTON PROVIDED TO THE BOTTOM OF PAGE TO GET SOON ANSWERS OF PROGRAMS.
Disclaimer: Here you can find all nptel assignment solutions related to CS stream.These may help you for your assignment.The answers are only for verification.You cannot copy these directly from the post(code of conduct of NPTEL).These is not 100%  correct solutions.

No comments:

Post a Comment

If you have any problems related to solutions or any concept please let me know.

Copyright (c) 2020 Custom Programs All Right Reserved

Pages