## CHANDIGARH UNIVERSITY ASSIGNMENT # 1 COMPUTER PROGRAMMING

CHANDIGARH UNIVERSITY

ASSIGNMENT # 1

We Will Write a Custom Essay Specifically
For You For Only \$13.90/page!

order now

COMPUTER PROGRAMMING
(UCT-145)

SUBMITTED BY:
NAME: SHIVANGI GOYAL
UID: 18BCS1228
BRANCH: CSE
SECTION & GROUP: 3-(B)
DATE OF SUBMISSION: 18 SEPTEMBER,2018

SUBMITTED TO:
BALJINDER KAUR
ASSISTANT PROFESSOR
Q1. Write a program in C to make such a pattern to make right angle triangle with a number which will repeat a number in a row.

#include
int main()
{
int n,m,i,j;
printf(“enter the number of rows and columns”);
scanf(“%d%d”,&n,&m);
for(i=1; i=180 or total in maths and subjects>=140.

#include
int main()
{
int math, phy, chem, tot,sub,x;
printf(“enter the marks of maths “);
scanf(“%d”,&math);
printf(“enter the marks of phy “);
scanf(“%d”,&phy);
printf(“enter the marks of chem “);
scanf(“%d”,&chem);
tot=math+phy+chem;
sub=phy+chem;
x=math+sub;
if(math>=65 && phy>=55 && chem>=50 || tot>=180 || x>=140)
{
printf(“eligible for course”);
}
else
{
printf(“not eligible”);
}
return 0;
}

Q5. Write a program in C to display multiplication table vertically from 1 to n.

#include
int main()
{
int a,n,i,t;
printf(“enter the number of terms”);
scanf(“%d”,&n);
printf(“enter number whose table has to displayed”);
scanf(“%d”,&a);
for(i=1 ; i