This C++ Program which prints pascal’s triangle. The program takes number of rows as input and uses nested loops to print pascal’s triangle. The first inner loop creates the indentation space and the second inner loop computes the value of binomial coefficient, creates indentation space and prints the binomial coefficient for that particular column. Here is source code of the C++ program which prints pascal’s triangle. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. IF YOU ARE USING MODERN COMPILERS LIKE DEV C++ AND CODEBLOCK S #include<iostream> using namespace std; int main() { int rows; cout << "Enter the number of rows : "; cin >> rows; cout << endl; for (int i = 0; i < rows; i++) { int val = 1; for (int j = 1; j < ...
Lineage OS is another CyanogenMod as the current team of CyanogenMod are working on any other project and the name of the project is Lineage OS and they have also launched website and named as Lineage OS which will take place of CyanogenMod from where the CM has left. it will be same as CM but there be one different is that the name only and everything will be same. Lineage OS official website is also launched you can check it LineageOS so for those who are thinking that from now there will be no updates regarding custom ROM and nightly build than they don’t have to worry LineageOS will cover all these things very soon. So CyanogenMod is still alive but the small change is that the name has changed to Lineage and the official CyanogenMod.inc has gave this statement '' The open source project and source code will remain available for anyone who wants to build CyanogenMod personally .'' So this clears us that the Cyanogenmod is back to “0” from starting just ...
#include<iostream.h> #include<conio.h> void main() { clrscr(); float a,b,c; char op,ch1; do { cout<<"enter first number ::: "; cin>>a; cout<<"enter second number ::: "; cin>>b; cout<<"enter the operator ::: "; cin>>op; switch(op) { case '+': c=a+b; cout<<"The Calculated result is ::: "<<c; break; case '-': c=a-b; cout<<"The Calculated result is ::: "<<c; break; case '*': c=a*b; cout<<"The Calculated result is ::: "<<c; break; case '/': c=a/b; cout<<"The Calculated result is ::: "<<c; break; default: cout<<"wrong operator used"; cin>>ch1; }//switch statement close cout<<"\nDo you want to continue(y/n) :: "; cin>>ch1; ...
Comments
Post a Comment