My Name Is Salman Masood , I am Computer Science &Amp; Maths Graduate from University of Karachi, Pakistan , Teaching Is My Passion and My Aim Is to Deliver All My Knowledge among Those Students Who Can'T Afford Tutors or Expensive Institute Fees. I Will Be Keep Sharing My All Knowledge and Information with You .... Remember Me in Your Prayers !
Thursday, 14 December 2017
Learn C language Part 8 how to show Maths tables using for loop
#include <stdio.h>
#include <conio.h>
main()
{
int t,n,i;
printf("Enter the number which table you want to show: ");
scanf("%d",&t);
printf("Enter the limit of table: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
printf("%d x %d = %d\n",t,i,t*i);
}
}
Learn C language Part 7 sum of natural n numbers & limit of a integer v...
#include <stdio.h>
#include <conio.h>
main()
{
//1 -100
int i=0,n;
float x;
l1:
x=0;
printf("Enter the number: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
x=x+i;
}
printf("sUM OF 100 = %.1f",x);
printf("\n\n\n");
printf("----------------------------------------------");
goto l1;
}
Learn C language Part 6 (How For Loop Works in all Programming languages)
#include <stdio.h>
#include <conio.h>
main()
{
int i=0;
for(i=1;i<=10;i++)
{
printf("salman%d\n",i);
}
printf("Loop break");
}
Wednesday, 13 December 2017
Learn Sql server in hindi/urdu part-25 (many to many relationship)
create table tblstudent
(
st_id int primary key identity,
st_name nvarchar(20) not null
)
insert into tblstudent
values('Ali')
insert into tblstudent
values('Bilal')
insert into tblstudent
values('Zahid')
insert into tblstudent
values('Fahad')
insert into tblstudent
values('saleem')
insert into tblstudent
values('kamran')
select * from tblstudent
create table tblcourses
(
c_id int primary key identity,
c_title nvarchar(20) not null
)
insert into tblcourses
values('data structure')
insert into tblcourses
values('database&management')
insert into tblcourses
values('Data Audit')
insert into tblcourses
values('data warehosuing')
insert into tblcourses
values('data mining')
insert into tblcourses
values('data Analytics')
select* from tblcourses
select * from tblstudent
create table course_student
(
cs_id int primary key identity,
cs_fk_st int foreign key references tblstudent(st_id),
cs_fk_cu int foreign key references tblcourses(c_id),
)
insert into course_student
values(1,3)
insert into course_student
values(1,5)
insert into course_student
values(1,6)
insert into course_student
values(2,2)
insert into course_student
values(2,3)
insert into course_student
values(2,6)
insert into course_student
values(3,1)
insert into course_student
values(3,2)
insert into course_student
values(3,3)
select s.st_id,c.c_id,s.st_name,c.c_title from course_student cs inner join tblstudent s on s.st_id=cs.cs_fk_st inner join tblcourses c on c.c_id=cs.cs_fk_cu
Learn Sql server in hindi/urdu part-24 (one to many relationship with pr...
create table customer
(
c_id int identity primary key,
c_name nvarchar(20) not null
)
insert into customer
values('asim')
insert into customer
values('basit')
insert into customer
values('danish')
insert into customer
values('Ebad')
select * from customer
create table product
(
p_id int identity primary key,
p_name nvarchar(20) not null
)
select * from product
create table tblorder
(
o_id int identity primary key,
o_product_id int foreign key references product(p_id),
o_date datetime,
o_c_id int foreign key references customer(c_id),
)
insert into tblorder
values(3,GETDATE(),4)
select c.c_id,c.c_name,p.p_name,o.o_id,o.o_date from tblorder o inner join product p on p.p_id=o.o_product_id inner join customer c on c.c_id=o.o_c_id
Tuesday, 12 December 2017
Learn C language Part 5 goto unconditional jump stattements with marksheet program
#include<stdio.h>
#include<conio.h>
main()
{
int eng,math,phy,urdu,islamiat;
float percentage;
l1:
printf("Enter the marks obtained in English: ");
scanf("%d",&eng);
if(eng<0)
{
printf("\nInvalid input !obtained Marks cannot be negative\n\n");
goto l1;
}
l2:
printf("\nEnter the marks obtained in Mathematics: ");
scanf("%d",&math);
if(math<0)
{
printf("\nInvalid input !obtained Marks cannot be negative\n\n");
goto l2;
}
l3:
printf("\nEnter the marks obtained in Physics: ");
scanf("%d",&phy);
if(phy<0)
{
printf("\nInvalid input !obtained Marks cannot be negative\n\n");
goto l3;
}
l4:
printf("\nEnter the marks obtained in Urdu: ");
scanf("%d",&urdu);
if(urdu<0)
{
printf("\nInvalid input !obtained Marks cannot be negative\n\n");
goto l4;
}
l5:
printf("\nEnter the marks obtained in Islamiat: ");
scanf("%d",&islamiat);
if(islamiat<0)
{
printf("\nInvalid input !obtained Marks cannot be negative\n\n");
goto l5;
}
percentage= ((eng+math+phy+urdu+islamiat)*100/500);
printf("Percentage: %.2f",percentage);
printf("\n\n\n Grade:");
if(percentage>=80)
{
printf("A+");
}
else if(percentage>=70)
{
printf("A");
}
else if(percentage>=60)
{
printf("B");
}
else if(percentage>=50)
{
printf("C");
}
else
{
printf("F");
}
}
#include<conio.h>
main()
{
int eng,math,phy,urdu,islamiat;
float percentage;
l1:
printf("Enter the marks obtained in English: ");
scanf("%d",&eng);
if(eng<0)
{
printf("\nInvalid input !obtained Marks cannot be negative\n\n");
goto l1;
}
l2:
printf("\nEnter the marks obtained in Mathematics: ");
scanf("%d",&math);
if(math<0)
{
printf("\nInvalid input !obtained Marks cannot be negative\n\n");
goto l2;
}
l3:
printf("\nEnter the marks obtained in Physics: ");
scanf("%d",&phy);
if(phy<0)
{
printf("\nInvalid input !obtained Marks cannot be negative\n\n");
goto l3;
}
l4:
printf("\nEnter the marks obtained in Urdu: ");
scanf("%d",&urdu);
if(urdu<0)
{
printf("\nInvalid input !obtained Marks cannot be negative\n\n");
goto l4;
}
l5:
printf("\nEnter the marks obtained in Islamiat: ");
scanf("%d",&islamiat);
if(islamiat<0)
{
printf("\nInvalid input !obtained Marks cannot be negative\n\n");
goto l5;
}
percentage= ((eng+math+phy+urdu+islamiat)*100/500);
printf("Percentage: %.2f",percentage);
printf("\n\n\n Grade:");
if(percentage>=80)
{
printf("A+");
}
else if(percentage>=70)
{
printf("A");
}
else if(percentage>=60)
{
printf("B");
}
else if(percentage>=50)
{
printf("C");
}
else
{
printf("F");
}
}
Learn C language Part -4 if else ,ladder if else, nested if else statements with practical example
#include <stdio.h>
#include <conio.h>
main()
{
int age;
printf("Enter your age: ");
scanf("%d",&age);
if(age>=18)
{
// printf("YOU ARE ELIGIBLE FOR THIS JOB......");
if(age<=20)
{
printf("YOU ARE ELIGIBLE FOR clerk JOB......");
}
else if(age<=25)
{
printf("YOU ARE ELIGIBLE FOR HR JOB......");
}
else if(age<=30)
{
printf("YOU ARE ELIGIBLE FOR manager JOB......");
}
else
{
printf("age limit exceeded!......");
}
}
else
{
printf("YOU ARE NOT ELIGIBLE FOR THIS JOB......");
}
}
#include <conio.h>
main()
{
int age;
printf("Enter your age: ");
scanf("%d",&age);
if(age>=18)
{
// printf("YOU ARE ELIGIBLE FOR THIS JOB......");
if(age<=20)
{
printf("YOU ARE ELIGIBLE FOR clerk JOB......");
}
else if(age<=25)
{
printf("YOU ARE ELIGIBLE FOR HR JOB......");
}
else if(age<=30)
{
printf("YOU ARE ELIGIBLE FOR manager JOB......");
}
else
{
printf("age limit exceeded!......");
}
}
else
{
printf("YOU ARE NOT ELIGIBLE FOR THIS JOB......");
}
}
Subscribe to:
Posts (Atom)
Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC
Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...
-
Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...
-
Load event: pictureBox3.Image = Image .FromFile( @"C:\Users\salman\Documents\Visual Studio 2013\Projects\WindowsFormsApplication3\W...