Lab 7
Lab 7
return (year
%4==0);
main(){
int year;
cout<<"enter year
to check its a leap year ot
not: ";
cin>>year;
if(func(year)){
cout<<year<<" IS A
LEAP YEAR";
}
else {
cout<<"its
not a leapyear";
}
}
#include<iostream>
using namespace std;
void count(char a[100],int &lower,int &upper,int
&digit){
for(int i=0;a[i]!=0;i++){
if( a[i]>='A' && a[i]<='Z'){
upper++;
}
else if(a[i]>='a' &&
a[i]<='z'){
lower++;
}
else if( a[i]>=0 &&
a[i]>=9){
digit++;
}
}
}
int main(){
char a[100];
int lower=0;
int upper=0;
int digit=0;
}
#include<iostream>
#include<cstring>
main(){
char name[100];
char ch;
cout<<"<---------------
WELCOME To Cringe
Game--------------------->"<<endl;
cout<<"your name:
"<<name<<endl;
cout<<" lower case: ";
for (int i = 0; i
<strlen(name); i++) {
ch = tolower(name[i]);
cout<<"\ncount of words:
"<<size<<endl;
strrev(name);