1.1 : A
1.2 : D
1.3 : C
1.4 : B
1.5 : A
1.6 : D

Q 1  : Write a program to print sum of following series of given terms ?

Terms=5
Series = (1)+(1+2)+(1+2+3)+(1+2+3+4) + (1+2+3+4+5)
Sum=35

Solution :

Using Nested Loop

import java.util.*;
class nextedloop
{

public static void main(String args [])
{

Compare of core java nested loop

This is will show you to compare of all three types of loops (while,do-while and for) and print a triangle pattern.

import java.util.*;
public class star
{

static void sop(String ar)
{
System.out.println(ar);
}
public static void main(String args[])
{
int i,j,k;
Scanner sc=new Scanner(System.in);

Pascal Triangle :

Pascal's Triangle is more than just a big triangle of numbers. There are two major areas where Pascal's Triangle is used, in Algebra and in Probability / Combinatorics.

Wednesday, 23 January 2019

Get multiple list using single object

MVC transfer data from controller to list in the form of list. If a page needs to load multiple lists using razor then you will have to wrap multiple lists into single object list. Following code will help you to accomplish this.

Modal

public class MarketingStaffModal
{
public string  ID  {get;set;}
public string Name {get;set;}

}

Check selected radio button

HTML

<input type="radio" value="Active" checked name="rdostatus" />Active

Friday, 18 January 2019

HTML inside if

HTML example for Radio button  inside of if-else using C# MVC

Code :

@if(@Model.Status=="1")
{
@:<input type="radio" value="Active" checked name="rdostatus" />Active

1.1 : A
1.2 : D
1.3 : C
1.4 : B
1.5 : C
1.6 : A
1.7 : B
1.8 : D
1.9 : A
1.10 : A

2.1 : T
2.2 : T
2.3 : F
2.4 : F
2.5 : F
2.6 : F
2.7 : F
2.8 : F
2.9 : T
2.10 : F

3.1 : F
3.2 : M
3.3 : I
3.4 : K
3.5 : B
3.6 : D
3.7 : L
3.8 : C
3.9 : E
3.10 : G

4.1 : I
4.2 : D
4.3 : H
4.4 : K
4.5 : G
4.6 : M
4.7 : E
4.8 : F
4.9 : A
4.10 : B