Beruflich Dokumente
Kultur Dokumente
int main(){
cout<<"Enter number b ="; //Prompt the user to enter the value of second number
cin>>b;
c=a;
d=b;
_getch();
return 0;
}
Output (1):
Task no. 2:
Code:
#include<iostream>
#include<conio.h>
int main(){
_getch();
return 0;
}
Output (2):
Task no. 3:
Code:
#include<iostream>
#include<conio.h>
int main(){
int a=0;
cout<<"Enter Marks (out of 100) = "; //Prompt the user to enter the grade
cin>>a;
_getch();
return 0;
}
Output (3):
Task no. 4:
Code:
#include<iostream>
#include<conio.h>
int main() {
char cha;
cout << "Enter any letter : ";
cin >> cha; //Prompt the user to enter the character
cout << endl;
int main(){
while(match<=5){
cout<<"Match no. "<<match<<endl;
match= match + 1;
cout<<endl<<"--------------------------------------------------------------
"<<endl;
}
r=r/5;
cout<<"Average for these 5 matches : "<<r<<endl;
_getch();
return 0;
}
Output (5):