Printing Pattern-3

3/*
logic:
On each line the number of elements equals the row number or line number
Eg: For 1st row has 1 element 2nd row has 2 element and so on…
Elements in each line starts with 1 and then increment by 1
*/

#include<stdio.h>
int main(){
int n,i,j;
printf(“Enter the number of rows\n”);
scanf(“%d”,&n);                                     //Input for number of rows
for(i=1;i<=n;i++){                                 //loop for each row
for(j=1;j<=i;j++){                            //In each row number of elements equal to row number
printf(“%d”,j);                            //Printing elements in a particular row
}
printf(“\n”);                                //Move to next line
}

return 0;
}

Printing pattern-2

2/*
logic:
On each line we need to print multiples of row number(assume row number starts with 0)
Eg: For 0th row all elements will be 0
For 1st row elements would be 0,1,2,3 and so on…
*/

#include<stdio.h>
int main(){
int n,i,j;
printf(“Enter the number of rows\n”);
scanf(“%d”,&n);                                     //Input for number of rows
for(i=0;i<n;i++){                                 //loop for each row
for(j=0;j<n;j++){                            //Loop for each element in each row
printf(“%d”,i*j);                        //Printing multiples of row number
}
printf(“\n”);                                //Move to next line
}

return 0;
}

Printing Pattern-1

10264844_1438704853039919_258805364_n/*
logic:
On each line the number of elements equals the row number or line number
eg:1st line contains 1 element, 2nd line contains 2 and so on…
The value of elements in a particular line also equals the row number
eg:1st line has elements with value 1  , 2nd line has elements with value 2 and so on…
*/

#include<stdio.h>
int main(){
int n,i,j;
printf(“Enter the number of lines to be printed\n”);
scanf(“%d”,&n);
for(i=1;i<=n;i++){                        // loop for number of rows
for(j=1;j<=i;j++){                      // Each row number of elements equal to row number
printf(“%d”,i);                   // Value of element equal to line number
}
printf(“\n”);                         // Move to next line
}
return 0;
}

Is your device vulnerable to Heartbleed?

Are concern about the heartbleed? Security company Lookout has released a free app called “Heartbleed Detector” to help verify if your Android device is at risk.

First question first, What is heartbleed?

The Heartbleed Bug is a serious vulnerability in the popular OpenSSL cryptographic software library. This weakness allows stealing the information protected, under normal conditions, by the SSL/TLS encryption used to secure the Internet. SSL/TLS provides communication security and privacy over the Internet for applications such as web, email, instant messaging (IM) and some virtual private networks (VPNs).

What versions of the OpenSSL are affected?

Status of different versions:

  • OpenSSL 1.0.1 through 1.0.1f (inclusive) are vulnerable
  • OpenSSL 1.0.1g is NOT vulnerable
  • OpenSSL 1.0.0 branch is NOT vulnerable
  • OpenSSL 0.9.8 branch is NOT vulnerable

Bug was introduced to OpenSSL in December 2011 and has been out in the wild since OpenSSL release 1.0.1 on 14th of March 2012. OpenSSL 1.0.1g released on 7th of April 2014 fixes the bug.

The bug is not affecting most devices, however, Google admitted that devices running Android 4.1.1, otherwise known as Jelly Bean, can be at risk.

This Android app, Heartbleed Detector scans your device and lets you know if it has been affected by the Heartbleed bug.

Heartbleed Detector will show green if your device is fine:

HB -Safe

 

 

If your device has been affected by the Heartbleed bug, but it’s inactive, it will show you this screen:

HB - Affected

 

And if your device isn’t OK, it will show you this screen:

HB - Danger

 

Download from Playstore

Unfortunately if your device has in fact been affected, there’s nothing much you can do about it other than wait for a fix to be released.

Source: HeartBleed | Business Insider

Appy Geek

Are you an Appy Geek?

With the world getting smaller and smaller, one usually want everything at fingertips. This app is for all the techies who want to have all tech news at one place.

Appy Geek accesses news from over 70 partners and pulls in thousands of posts straight to you, as per your specifications. You can personalize your ‘home’ by selecting news channels or topics that interest you. You can set alerts on your favorite topics. It even comes with a built in share feature that allows to you to share articles that you like straight to Facebook, Twitter, email or even WhatsApp.

Appy Geek

Appy Geek brings you all the leading tech news sources from the industry in a cleverly laid-out user interface, including TechRadar, Gizmodo, T3 Magazine, The Next Web and more!

With Appy Geek you can set-up your own personal news channels on the topics of your choice, and explore the news through TagNav™, an innovative news navigation system. Get the whole picture on any subject!

AppyGeek is an all in one application with a delightful interface which is available on all devices. I recommend AppyGeek to all tech enthusiasts to get hands-on this application.

Source: Mobiles Republic | Yaabot

C Practical and Assignment Programs – Pattern Printing 9

C Practical and Assignment Programs-Pattern Printing 6
In this video we are going to write a program to print a pattern in form of diamond shape consisting of “*”.  We are going to use nested for loops i.e. one loop inside another. The full description of question is provided below. Now this program is written in C programming language but will work in C++. Fell free to provide you suggestion.

//Source Code:
#include<stdio.h>
void main(){
int totalRows=5;
int row,colSpace,colStar;
for(row=1;row<=totalRows;row++){
for(colSpace=totalRows-row;colSpace>=1;colSpace--){
printf(" ");
}
for(colStar=1;colStar<=2*row-1;colStar++){
printf("*");
}
printf("\n");
}

for(row=totalRows-1;row>=1;row--){

for(colSpace=1;colSpace<=totalRows-row;colSpace++){
printf(" ");
}
for(colStar=1;colStar<=2*row-1;colStar++){
printf("*");
}
printf("\n");

}

}

Pattern Printing 8

Playlist

Facebook Page

C Practical and Assignment Programs – Printing Pascals Triangle

C Practical and Assignment Programs-Pattern Printing 6
In this video we are going to write a program to print a Pascal’s Triangle. We are going to use nested for loops i.e. one loop inside another.The full description of question is provided below. Now this program is written in C programming language but will work in C++. Fell free to provide you suggestion.

//Source Code:
#include<stdio.h>
void main(){

int n=5;
int row,colStar,colSp;
for(row=0;row<=n;row++){

int print=1;
int mul=row;
int div=1;
for(colSp=n-row;colSp>=1;colSp--){
printf(" ");
}
for(colStar=0;colStar<=row;colStar++){
printf("%d ",print);
print*=mul;
print=print/div;
mul--;
div++;
}
printf("\n");

}


}

Pattern Printing 6

Playlist

Facebook Page

C Practical and Assignment Programs – Pattern Printing 6

C Practical and Assignment Programs-Pattern Printing 6
In this video we are going to write a program to print a pattern in form of right angled triangle consisting of “*”. We are going to use nested for loops i.e. one loop inside another.The full description of question is provided below. Now this program is written in C programming language but will work in C++. Fell free to provide you suggestion.

//Source Code:
#include<stdio.h>
void main(){

int n=20;
int row,colStar,colSp;
for(row=1;row<=n;row++){

for(colSp=n-row;colSp>=1;colSp--){
printf(" ");
}
for(colStar=1;colStar<=row;colStar++){
printf("* ");
}
printf("\n");

}

}

Facebook Page

Pattern Printing 5

Playlist

 

C Practical and Assignment Programs – Pattern Printing 5

C Practical and Assignment Programs-Pattern Printing 4
In this video we are going to write a program to print a pattern consisting of numbers . We are going to use nested for loops ie one loop inside another.The full description of question is provided below. Now this program is written in C programming language but will work in C++. Fell free to provide you suggestion.

Q. To print various patterns using loop constructs like:
1
1 0
1 0 1
1 0 1 0
1 0 1 0 1

//Source Code:
#include<stdio.h>
void main(){
int numRows=10;
int row,col;
for(row=1;row<=numRows;row++){

for(col=1;col<=row;col++){

int remainder=col%2;
printf("%d ",remainder);

}
printf("\n");

}

}

Facebook Page

Pattern Printing 4

Playlist

C Practical and Assignment Programs – Pattern Printing 8

C Practical and Assignment Programs-Pattern Printing 6
In this video we are going to write a program to print a pattern in form of right angled triangle consisting of “*”. We are going to use nested for loops i.e. one loop inside another.The full description of question is provided below. Now this program is written in C programming language but will work in C++. Fell free to provide you suggestion.

//Source Code:

#include<stdio.h>
void main(){

int n=20;
int row,colStar,colSp;
for(row=1;row<=n;row++){

for(colSp=n-row;colSp>=1;colSp--){
printf(" ");
}
for(colStar=1;colStar<=2*row-1;colStar++){
printf("*");
}
printf("\n");

}


}

Pascals Triangle

Playlist

Facebook Page

Follow

Get every new post delivered to your Inbox.