Monday, September 16, 2019

2nd assignment sheet 2nd question

#include<stdio.h>
main()
{    
int account;
float begbal,totchar,tocred,allcred ,newbal   ;
printf("enter your account no.\n");
scanf("%d",&account);
printf("enter your begning balance");
scanf("%f",&begbal);
printf("enter total charges");
scanf("%f",&totchar);
printf("enter total credit \n");
scanf("%f",&tocred);
printf("enter allowed credit limit");
scanf("%f",&allcred);
newbal=begbal+totchar-tocred;
printf("account:%d\n credit limit:\n balance:\n ",account,allcred,newbal);
if(newbal>=allcred)
{printf("credit limit exeeded");}
else{ printf("credit limit not exeeded");}
}

No comments:

Implement stsStr Leetcode solution

  28.   Implement strStr() Easy Implement  strStr() . Given two strings  needle  and  haystack , return the index of the first occurrence of...