4/10/2025 PROGRAMMING
FUNDAMENTALS
ASSIGNMENT 2
Ahmad Jaan butt
GOVT GRADUATE COLLEGE SATELLITE TOWN, GUJRANWALA
, QUESTION NO 1.
Write a program that Prints the Sum of 2 numbers where num1=20 and num2=30.
PROGRAM:
#include<conio.h>
#include<math.h>
int main(){
int num1=20;
int num2=30;
int sum=num1+num2;
printf("The sum of two numbers is %d", sum);
}
OUTPUT:
QUESTION NO 2.
Write a Program that will take 2 decimal numbers from user as Input using scanf function and
Print the result of all arithmetic Operations that can be performed on those numbers. i.e. +,-
,% etc.
PROGRAM:
#include<conio.h>
#include<math.h>
int main(){
float num1,num2;
FUNDAMENTALS
ASSIGNMENT 2
Ahmad Jaan butt
GOVT GRADUATE COLLEGE SATELLITE TOWN, GUJRANWALA
, QUESTION NO 1.
Write a program that Prints the Sum of 2 numbers where num1=20 and num2=30.
PROGRAM:
#include<conio.h>
#include<math.h>
int main(){
int num1=20;
int num2=30;
int sum=num1+num2;
printf("The sum of two numbers is %d", sum);
}
OUTPUT:
QUESTION NO 2.
Write a Program that will take 2 decimal numbers from user as Input using scanf function and
Print the result of all arithmetic Operations that can be performed on those numbers. i.e. +,-
,% etc.
PROGRAM:
#include<conio.h>
#include<math.h>
int main(){
float num1,num2;